Skip to content

Commit

Permalink
Use GitHub environment to store version
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Mar 27, 2023
1 parent 978b16f commit 3cb0e50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,15 @@ jobs:
fi
version=$(grep "^version = " build.conf | sed -e 's/^version = //')
echo "configuring character generator version ${version} ..."
echo "ver=${version}" >> $GITHUB_ENV
- name: Prepare Node.js
run: |
sudo snap install --classic node
npm install
- name: Package Web
run: |
version=$(grep "^version = " build.conf | sed -e 's/^version = //')
python3 build.py dist-web
run: python3 build.py dist-web

- name: Package Desktop
run: |
version=$(grep "^version = " build.conf | sed -e 's/^version = //')
python3 build.py dist-desktop
run: python3 build.py dist-desktop
4 changes: 2 additions & 2 deletions .github/workflows/deploy_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
fi
version=$(grep "^version = " build.conf | sed -e 's/^version = //')
echo "configuring character generator version ${version} ..."
echo "ver=${version}" >> $GITHUB_ENV
- name: Stage
run: |
version=$(grep "^version = " build.conf | sed -e 's/^version = //')
python3 build.py stage-web
sed -i -e "s/\"asset-info\":\(.*\?\)\/master\//\"asset-info\":\1\/v${version}\//" build/web/script/config.js
sed -i -e "s/\"asset-info\":\(.*\?\)\/master\//\"asset-info\":\1\/v${{ env.ver }}\//" build/web/script/config.js
- name: Publish
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 3cb0e50

Please sign in to comment.