forked from GregTechCEu/Buildscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (71 loc) · 2.5 KB
/
Copy pathbuild-packages.yml
File metadata and controls
81 lines (71 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release starter and migration packages on tag push
on:
workflow_dispatch:
push:
tags: [ '*' ]
jobs:
zip-and-release-packages:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Point Blowdryer at the released tag
if: startsWith(github.ref, 'refs/tags/')
run: |
# Bump the spotless source tag so the packaged settings.gradle pulls
# the Blowdryer config matching this release (keeps existing owner/repo).
sed -i -E "s#(github '[^']+', 'tag', ')[^']*(')#\1${RELEASE_VERSION}\2#" settings.gradle
grep -n "', 'tag', '" settings.gradle
- name: Prepare release folder
run: mkdir packages
- name: Zip starter
uses: montudor/action-zip@v1
with:
args: >
zip -r packages/starter.zip . \
\
-x "*.git/*" \
-x ".github/workflows/build-packages.yml" \
-x ".github/workflows/buildscript-maintenance.yml" \
-x "docs/*" \
\
-x "spotless.importorder" \
-x "CODEOWNERS" \
-x "LICENSE" \
-x "README.md" \
\
-x "packages/" \
-x "packages/starter.zip" \
-x "packages/migration.zip"
- name: Zip migration
uses: montudor/action-zip@v1
with:
args: >
zip -r packages/migration.zip . \
\
-x "*.git/*" \
-x ".github/workflows/build-packages.yml" \
-x ".github/workflows/buildscript-maintenance.yml" \
-x "docs/*" \
-x "src/*" \
\
-x "spotless.importorder" \
-x "CODEOWNERS" \
-x "LICENSE" \
-x "README.md" \
\
-x "packages/" \
-x "packages/starter.zip" \
-x "packages/migration.zip"
- name: Release tag
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}-packages"
prerelease: false
title: "${{ env.RELEASE_VERSION }} starter and migration packages"
files: packages/*