Skip to content

Commit

Permalink
ci: add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
orionmiz committed Apr 11, 2024
1 parent e779204 commit 933fb32
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches:
- main

name: Publish packages - main

jobs:
publish-package:
name: Publish packages
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: https://registry.npmjs.org
- uses: actions/cache@v2
id: yarn-unplugged-cache
with:
path: |
'.yarn/unplugged/'
'.yarn/build-state.yml'
'.yarn/install-state.gz'
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
- name: Install unplugged dependencies and check immutable
run: |
yarn install --immutable
shell: bash

- name: Create PR or release packages
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
version: yarn version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 933fb32

Please sign in to comment.