Merge pull request #14 from bunkerweb/archive-fix-creation #24
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 Bunker Version | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Build Repo | |
run: | | |
npm i && npm run build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: kolf-build-latest-appImage | |
path: dist/index.html | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dist/index.html | |
- name: Move dist file from repository, switch branches, and copy back | |
run: | | |
cp ./dist/index.html ../index.html | |
git fetch | |
git switch updates | |
rm ./index.html | |
cp ../index.html ./index.html | |
- name: Commit changes | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add index.html | |
git commit -m ${{ github.ref_name }} | |
- name: Push changes | |
run: | | |
git push --set-upstream origin updates | |