|
1 | | -# This is a basic workflow to help you get started with Actions |
| 1 | +name: Package and Release |
2 | 2 |
|
3 | | -name: CI |
4 | | - |
5 | | -# Controls when the action will run. Triggers the workflow on push or pull request |
6 | | -# events but only for the master branch |
7 | 3 | on: |
8 | 4 | push: |
9 | 5 | branches: [ develop ] |
10 | | - tags: |
11 | | - - '**' |
12 | | - - '!**classic**' |
13 | 6 |
|
14 | 7 | permissions: |
15 | 8 | contents: write |
16 | 9 |
|
17 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
18 | 10 | jobs: |
19 | | - # This workflow contains a single job called "build" |
20 | 11 | build: |
21 | | - # The type of runner that the job will run on |
22 | 12 | runs-on: ubuntu-latest |
23 | 13 | env: |
24 | 14 | GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} |
25 | 15 |
|
26 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
27 | 16 | steps: |
28 | | - # we first have to clone the AddOn project, this is a required step |
29 | 17 | - name: Clone project |
30 | 18 | uses: actions/checkout@v6 |
31 | 19 | with: |
32 | | - fetch-depth: 0 # gets git history for changelogs |
| 20 | + fetch-depth: 0 |
33 | 21 |
|
34 | 22 | - name: Package for develop artifacts |
35 | 23 | id: package_develop |
36 | | - if: github.ref_type == 'branch' |
37 | 24 | uses: BigWigsMods/packager@v2 |
38 | 25 | with: |
39 | 26 | args: -d |
40 | 27 |
|
41 | | - - name: Package and publish tagged release |
42 | | - id: package_release |
43 | | - if: github.ref_type == 'tag' |
44 | | - uses: BigWigsMods/packager@v2 |
45 | | - |
46 | | - - name: Upload develop artifact |
47 | | - if: github.ref_type == 'branch' |
48 | | - uses: actions/upload-artifact@v4 |
49 | | - with: |
50 | | - name: packaged-zips-${{ github.run_number }} |
51 | | - path: .release/*.zip |
52 | | - if-no-files-found: error |
53 | | - include-hidden-files: true |
54 | | - |
55 | | - - name: Upload tagged release artifact |
56 | | - if: github.ref_type == 'tag' |
57 | | - uses: actions/upload-artifact@v4 |
| 28 | + - name: Publish zip to GitHub Releases |
| 29 | + uses: softprops/action-gh-release@v2 |
58 | 30 | with: |
59 | | - name: packaged-zips-${{ github.run_number }} |
60 | | - path: .release/*.zip |
61 | | - if-no-files-found: error |
62 | | - include-hidden-files: true |
| 31 | + tag_name: develop-${{ github.sha }} |
| 32 | + name: Develop build ${{ github.sha }} |
| 33 | + target_commitish: ${{ github.sha }} |
| 34 | + prerelease: true |
| 35 | + files: .release/*.zip |
| 36 | + fail_on_unmatched_files: true |
0 commit comments