-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish to npm with Yarn | ||
name: Release | ||
|
||
on: | ||
push: | ||
|
@@ -9,29 +9,23 @@ on: | |
- release | ||
|
||
jobs: | ||
publish: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Install Yarn | ||
run: npm install -g [email protected] | ||
|
||
- name: Install dependencies with Yarn | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run tests with Yarn | ||
run: yarn test | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Publish to npm with Yarn | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/release' | ||
run: yarn publish --access public | ||
- name: Release | ||
run: npx semantic-release | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,8 @@ jobs: | |
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install Yarn | ||
run: npm install -g [email protected] | ||
|
||
- name: Install dependencies with Yarn | ||
run: yarn install --frozen-lockfile | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests with Yarn | ||
run: yarn test | ||
run: npm test |