Skip to content

Commit

Permalink
fix: reuse release workflow (#67)
Browse files Browse the repository at this point in the history
* fix: reuse release workflow

* use action
  • Loading branch information
SKairinos authored Nov 20, 2024
1 parent 241eed0 commit f5edeec
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,17 @@ jobs:
node-version: 18

release:
needs: [test]
concurrency: release
runs-on: ubuntu-latest
needs: [test]
if: github.ref_name == 'main'
env:
# Value must match in the test job.
NODE_VERSION: 18
# Release if:
# - the repo's owner is Ocado Tech.
# - a change is made to the default branch.
if: |
github.repository_owner_id == 2088731 &&
github.ref_name == github.event.repository.default_branch
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
fetch-depth: 0

- name: 🌐 Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: 🛠 Install Dependencies
run: |
npm install --global npm
npm install --global \
semantic-release@^20.1.1 \
@semantic-release/git@^10.0.1 \
@semantic-release/changelog@^6.0.2
- name: 🚀 Publish Semantic Release
env:
GH_TOKEN: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: cfl-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: cfl-bot
GIT_COMMITTER_EMAIL: [email protected]
run: npx semantic-release
uses: ocadotechnology/codeforlife-workspace/.github/actions/github/release@main
with:
cfl-bot-gh-token: ${{ secrets.CFL_BOT_GH_TOKEN }}

0 comments on commit f5edeec

Please sign in to comment.