Merge pull request #411 from CovenEsme/1.2-release #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
# automatically run on version tag | |
on: | |
push: | |
tags: | |
- "v*.*" | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yaml | |
with: | |
env: "Production" | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download all Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
run-id: ${{ github.run_id }} | |
github-token: ${{ github.token }} | |
- name: Read Version | |
uses: SebRollen/[email protected] | |
id: read_toml | |
with: | |
file: "constants/randoconstants.py" | |
field: "VERSION" | |
- name: Zip windows build | |
run: | | |
cd "Skyward Sword HD Randomizer v${{ steps.read_toml.outputs.value }} (windows)" | |
zip "Skyward_Sword_HD_Randomizer_v${{ steps.read_toml.outputs.value }}_windows.zip" ./* -r | |
rm *.exe | |
cd .. | |
# filter the artifacts by name, ignoring the version | |
- name: Filter artifacts | |
id: filter_artifacts | |
run: | | |
echo 'builds<<EOF' >> $GITHUB_OUTPUT | |
echo "$(find . -name "Skyward_Sword_HD_Randomizer*")" >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
# create a release | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: ${{ contains(github.ref, '-') }} | |
files: | | |
${{ steps.filter_artifacts.outputs.builds }} |