|
1 | 1 | name: PortMaster Release |
2 | 2 |
|
3 | 3 | on: |
4 | | - # We only run manually |
5 | 4 | workflow_dispatch: |
6 | | - |
7 | | -concurrency: |
8 | | - group: release # only 1 release at a time |
| 5 | + inputs: |
| 6 | + branch: |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + tag: |
| 10 | + required: true |
| 11 | + type: string |
| 12 | + description: |
| 13 | + required: false |
| 14 | + type: string |
9 | 15 |
|
10 | 16 | jobs: |
11 | 17 | build: |
12 | | - runs-on: self-hosted |
| 18 | + runs-on: ubuntu-latest |
13 | 19 |
|
14 | 20 | steps: |
15 | | - - uses: hmarr/debug-action@v2 |
16 | | - name: "debug: ${{github.event_name}}" |
17 | | - |
18 | | - - name: env - better defaulting of env vars; |
19 | | - id: env |
20 | | - run: | |
21 | | - ~/git-scripts/PortMaster-New-Prepare.sh |
22 | | -
|
23 | | - - name: Get release name for artifacts |
24 | | - id: date |
25 | | - run: | |
26 | | - echo "date=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_OUTPUT |
27 | | -
|
28 | | - - name: Generate Port Files. |
29 | | - id: ports-info |
30 | | - run: | |
31 | | - ~/git-scripts/PortMaster-New-Build-Release.sh "${{steps.date.outputs.date}}" |
32 | | -
|
33 | | - ###################################################################### |
34 | | - ## Only run these if it is the PortMaster-New repo |
35 | | - - uses: robinraju/[email protected] |
36 | | - if: ${{ steps.env.outputs.RELEASE_REPO }} == "PortMaster-New" |
| 21 | + - name: Checkout Branch |
| 22 | + uses: actions/checkout@v4 |
37 | 23 | with: |
38 | | - out-file-path: "releases" |
39 | | - repository: "PortsMaster/PortMaster-GUI" |
40 | | - tag: "${{ steps.env.outputs.PMGUI_RELEASE }}" |
41 | | - fileName: "PortMaster.zip" |
| 24 | + ref: ${{ inputs.branch }} |
| 25 | + sparse-checkout: | |
| 26 | + ports/cataclysm-dda |
| 27 | + fetch-depth: 1 |
42 | 28 |
|
43 | | - ###################################################################### |
44 | | - |
45 | | - - name: "Prepare Release" |
46 | | - uses: ncipollo/release-action@v1 |
| 29 | + - name: Archive Folder |
| 30 | + uses: thedoctor0/[email protected] |
47 | 31 | with: |
48 | | - tag: "${{steps.date.outputs.date}}" |
49 | | - allowUpdates: true |
50 | | - draft: true |
51 | | - prerelease: false |
52 | | - replacesArtifacts: false |
53 | | - omitNameDuringUpdate: true |
54 | | - artifacts: "releases/*" |
55 | | - token: ${{ secrets.GITHUB_TOKEN }} |
56 | | - repo: ${{ steps.env.outputs.RELEASE_REPO }} |
57 | | - owner: ${{ steps.env.outputs.RELEASE_ORG }} |
| 32 | + type: "zip" |
| 33 | + directory: "ports/cataclysm-dda" |
| 34 | + filename: "cataclysm-dda.zip" |
| 35 | + exclusions: "*.git* /*node_modules/* .editorconfig" |
58 | 36 |
|
59 | | - - name: "Publish Release" |
| 37 | + - name: Release |
60 | 38 | uses: ncipollo/release-action@v1 |
61 | 39 | with: |
62 | | - tag: "${{steps.date.outputs.date}}" |
63 | | - omitBodyDuringUpdate: true |
64 | | - omitNameDuringUpdate: true |
65 | | - allowUpdates: true |
| 40 | + tag: "${{ inputs.branch }}-${{ inputs.tag }}" |
| 41 | + artifacts: "ports/cataclysm-dda/cataclysm-dda.zip" |
| 42 | + body: ${{ inputs.description }} |
66 | 43 | draft: false |
67 | 44 | prerelease: false |
68 | 45 | token: ${{ secrets.GITHUB_TOKEN }} |
69 | | - repo: ${{ steps.env.outputs.RELEASE_REPO }} |
70 | | - owner: ${{ steps.env.outputs.RELEASE_ORG }} |
71 | | - |
72 | | - - name: Release Info |
73 | | - id: info |
74 | | - run: | |
75 | | - echo "Published release: ${{steps.date.outputs.date}} to: https://github.com/${{ steps.env.outputs.RELEASE_ORG}}/${{ steps.env.outputs.RELEASE_REPO}}" |
0 commit comments