publish.yml
1 name: Publish 2 3 # Only trigger, when the build workflow succeeded 4 on: 5 workflow_run: 6 workflows: [Build] 7 types: [completed] 8 branches: [master] 9 10 jobs: 11 release: 12 runs-on: ubuntu-latest 13 14 steps: 15 - uses: actions/checkout@v4 16 - name: 'Prepare files for upload' 17 run: | 18 mkdir -p ./upload 19 cp ./notblood.pk3 ./upload 20 cp -a ./package/common/. ./upload/ 21 22 - uses: dawidd6/action-download-artifact@v6 23 with: 24 workflow: build.yml 25 workflow_conclusion: success 26 path: ./upload 27 28 - name: Zipping artifacts for release 29 run: | 30 cd ./upload 31 chmod +x ./notblood-macos/notblood.app/Contents/MacOS/notblood 32 ls -R -l 33 for i in */; do cp *.pk3 "${i%/}"; cp *.txt "${i%/}"; mkdir -p "${i%/}"/autoload; mv "${i%/}"/addons.txt "${i%/}"/autoload; done 34 for i in */; do cd "${i%/}"; zip -9 -r "../${i%/}.zip" ./; cd ..; done 35 - name: Publish artifacts to release 36 uses: "marvinpinto/action-automatic-releases@latest" 37 with: 38 repo_token: "${{ secrets.GITHUB_TOKEN }}" 39 automatic_release_tag: "latest" 40 prerelease: false 41 title: "Latest Build" 42 files: | 43 ./upload/*.zip