Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
maphel authored Sep 4, 2023
1 parent ef8c1e1 commit f19f72a
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,6 @@ on:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install Yarn 3 (Berry)
run: npm install -g yarn@berry

- name: Set up Yarn 3
run: yarn set version berry

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build

- name: Exclude source maps
run: rm -rf dist/**/*.map

- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

update-master-to-tagged-version:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -70,3 +37,37 @@ jobs:
git add package.json
git commit -m "Update package.json version to $VERSION on main"
git push origin main
publish:
needs: update-master-to-tagged-version
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install Yarn 3 (Berry)
run: npm install -g yarn@berry

- name: Set up Yarn 3
run: yarn set version berry

- name: Install dependencies
run: yarn install --immutable

- name: Build
run: yarn build

- name: Exclude source maps
run: rm -rf dist/**/*.map

- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit f19f72a

Please sign in to comment.