CI build #197
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
# build and commit the dist folder after successful CI | |
name: CI build | |
on: | |
workflow_run: | |
workflows: | |
- "CI" | |
types: | |
- "completed" | |
branches: [master] | |
jobs: | |
on-success: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
# build dist folder | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- name: Set up Git commit author | |
run: git config --local user.email "github-actions[bot]@users.noreply.github.com" && git config --local user.name "github-actions[bot]" | |
- name: Create Github Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: yarn release --ci | |
# commit and push dist folder | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "build(packaging): ci build" | |
file_pattern: dist | |
add_options: "--force" |