Skip to content

Commit

Permalink
ci(release): leveraged the reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Jan 27, 2023
1 parent b9e612b commit 01497a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 33 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,10 @@ jobs:
cache: npm
- run: npm clean-install
- run: npm test
trigger-release:
runs-on: ubuntu-latest
if: github.event_name == 'push'
release:
needs:
- verify
- verify-matrix
steps:
- uses: octokit/request-action@v2.x
with:
route: >-
POST
/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: form8ion
repo: remark-lint-preset
ref: ${{ github.ref }}
workflow_id: release.yml
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
21 changes: 3 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,8 @@ name: Release
push:
branches:
- alpha
workflow_dispatch: {}
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
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 }}
uses: form8ion/.github/.github/workflows/release-package.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 comments on commit 01497a2

Please sign in to comment.