Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
ci(release): updated to the modern release appraoch
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed May 1, 2022
1 parent aa20994 commit 3b8c0b7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Node.js CI
push:
branches:
- master
- alpha
- beta
- renovate/**
pull_request:
Expand Down Expand Up @@ -44,23 +43,21 @@ jobs:
cache: npm
- run: npm clean-install
- run: npm test
release:
trigger-release:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs:
- verify
- verify-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v3
- uses: octokit/[email protected]
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: bahmutov/npm-install@v1
- name: semantic-release
uses: cycjimmy/semantic-release-action@v2
route: >-
POST
/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: travi
repo: github-scaffolder
ref: ${{ github.ref }}
workflow_id: release.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
'on':
push:
branches:
- alpha
workflow_dispatch: {}
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 comments on commit 3b8c0b7

Please sign in to comment.