Skip to content

Commit 5959456

Browse files
authored
Update release.yaml
1 parent 1da5f20 commit 5959456

File tree

1 file changed

+27
-57
lines changed

1 file changed

+27
-57
lines changed

.github/workflows/release.yaml

Lines changed: 27 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,45 @@
11
name: PortMaster Release
22

33
on:
4-
# We only run manually
54
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
915

1016
jobs:
1117
build:
12-
runs-on: self-hosted
18+
runs-on: ubuntu-latest
1319

1420
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
3723
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
4228

43-
######################################################################
44-
45-
- name: "Prepare Release"
46-
uses: ncipollo/release-action@v1
29+
- name: Archive Folder
30+
uses: thedoctor0/[email protected]
4731
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"
5836

59-
- name: "Publish Release"
37+
- name: Release
6038
uses: ncipollo/release-action@v1
6139
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 }}
6643
draft: false
6744
prerelease: false
6845
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

Comments
 (0)