Skip to content

Commit

Permalink
chore: update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kedrzu committed Jan 22, 2025
1 parent fb2b547 commit 9dd378b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: Update yarn.lock file
name: Check commit
on:
push:
branches: [main]
branches: [main, release]
jobs:
release:
check-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest

- name: Setup Git
run: |
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
- run: yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Check for changes
id: check_changes
- name: Commit yarn.lock changes
run: |
if git diff --exit-code; then
echo "No changes to commit."
Expand All @@ -31,3 +25,9 @@ jobs:
git commit -a -m "chore: update yarn.lock"
git push
fi
- name: Build
run: yarn turbo run build

- name: Test
run: yarn test
11 changes: 11 additions & 0 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,14 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
if: ${{ inputs.dry_run != true }}
with:
ref: main

- name: Merge release to main
if: ${{ inputs.dry_run != true }}
run: |
git merge --no-ff release -m "chore: auto-merge release -> main"
git push

0 comments on commit 9dd378b

Please sign in to comment.