Skip to content

Commit

Permalink
Merge pull request #34 from get-glu/gm/ui-tag-workflow
Browse files Browse the repository at this point in the history
feat: add gh workflow to publish ui tag on version tag
  • Loading branch information
GeorgeMac authored Nov 18, 2024
2 parents d497391 + 39650fc commit fc71c29
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm ci
working-directory: ui

- name: Remove dist entry from .gitignore
run: sed -i '/dist/d' ui/.gitignore

- run: npm run build
working-directory: ui

- name: Add commit, tag and push changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add ./ui
git commit -am "feat: adding generated distributable assets"
NEW_TAG=$(echo "${{ github.ref }}" | sed 's#^refs/tags/\(.*\)$#ui/\1#')
echo "Tagging new version $NEW_TAG"
git tag $NEW_TAG
git push origin $NEW_TAG

0 comments on commit fc71c29

Please sign in to comment.