Update buildRelease.yml #13
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: Create or update the updates branch | |
run: | | |
cp dist/index.html . | |
find . ! -name 'index.html' -not -name '.gitignore' -not -path './.git/*' -type f -exec rm -f {} + | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git checkout -B updates | |
git pull origin updates --rebase | |
git add -A | |
git commit -m "Updated bunker" | |
- name: Push changes | |
run: | | |
git push --set-upstream origin updates |