Skip to content

Build and Release

Build and Release #10

name: Build and Release
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: yarn install
- name: Build project
run: yarn build
- name: Commit dist folder
env:
BDP_UI_TOKEN: ${{ secrets.BDP_UI_TOKEN }}
run: |
git config --global user.email "${{ secrets.EMAIL }}"
git config --global user.name "${{ secrets.NAME }}"
git add dist
git commit -m "Build dist folder for release ${{ github.ref }}" || echo "No changes to commit"
git push
- name: Update release with dist folder
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ github.ref }} dist/** --clobber