Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 15 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: 🕊 Release

on:
release:
Expand All @@ -13,39 +13,32 @@ jobs:
!contains(github.ref, 'nightly')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- run: echo "::set-output name=version::$(cat .nvmrc)"
id: nvmrc
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: Setup node
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvmrc.outputs.version }}"
node-version-file: ".nvmrc"
cache: "yarn"

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache
- name: 📥 Install deps
# even though this is called "npm-install" it does use yarn to install
# because we have a yarn.lock and caches efficiently.
uses: bahmutov/npm-install@v1

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
- name: 🏗 Build
run: yarn build

- name: Setup npm auth
- name: 🔐 Setup npm auth
run: |
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc

- name: Publish
- name: 🚀 Publish
run: npm run publish

comment:
Expand Down