Skip to content

Merge pull request #418 from CovenEsme/1.4-release #6

Merge pull request #418 from CovenEsme/1.4-release

Merge pull request #418 from CovenEsme/1.4-release #6

Workflow file for this run

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 }}