Skip to content

Commit

Permalink
fix: fix release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ceriath <gh@ceriath.net>
  • Loading branch information
ceriath committed Nov 30, 2023
1 parent bbb7c88 commit 408043a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Expand Up @@ -14,24 +14,29 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Write raw version to env
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Substitute version in manifest
uses: microsoft/variable-substitution@v1
with:
files: 'system.json'
env:
version: ${GITHUB_REF_NAME#v}
manifest: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/system.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/candelafvtt-${GITHUB_REF_NAME}.zip
version: ${{ env.VERSION }}
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/candelafvtt-${{github.event.release.tag_name}}.zip

- name: Install dependencies and build
run: |
npm install -g yarn
yarn install
sh build.sh ${GITHUB_REF_NAME#v}
sh build.sh ${{ env.VERSION }}
- name: Update release with files
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: ${{ github.event.release.name }}
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json, ./dist/candelafvtt-${GITHUB_REF_NAME}.zip'
artifacts: 'dist/system.json,dist/candelafvtt-v${{ env.VERSION }}.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
body: ${{ github.event.release.body }}
3 changes: 2 additions & 1 deletion build.sh
Expand Up @@ -10,4 +10,5 @@ rm -rf dist/
mkdir dist
yarn gulp build
yarn gulp pack
zip -r dist/candelafvtt-v${1}.zip css/ img/ lang/ module/ packs/ templates/ ./CHANGELOG.md ./LICENSE.txt ./NOTES.md ./system.json ./template.json -x "packs/src/*"
zip -r dist/candelafvtt-v${1}.zip css/ img/ lang/ module/ packs/ templates/ ./CHANGELOG.md ./LICENSE.txt ./NOTES.md ./system.json ./template.json -x "packs/src/*"
cp system.json dist/

0 comments on commit 408043a

Please sign in to comment.