Skip to content

Commit

Permalink
fix: updated release.yml (#3)
Browse files Browse the repository at this point in the history
* fix: updated release.yml
  • Loading branch information
0xKurt authored Oct 21, 2023
1 parent 1125579 commit 3de5d21
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Prerelease

on:
pull_request:

jobs:
prerelease:
name: Prerelease
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install dependencies
run: npx ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Lint
run: npm run lint-fix
- name: Test
run: npm run test:unit --if-present
18 changes: 2 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,16 @@ on:
branches:
- main
- beta
pull_request:

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install dependencies
run: npx ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Lint
run: npm run lint-fix
- name: Test
run: npm run test:unit --if-present
- name: Prerelease
uses: ./.github/workflows/prerelease
- name: Release
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit 3de5d21

Please sign in to comment.