Skip to content

Instantly share code, notes, and snippets.

@barisbll
Created July 19, 2023 10:11
Show Gist options
  • Save barisbll/4d0b563c6ec51d7b734bae6331e13dd7 to your computer and use it in GitHub Desktop.
Save barisbll/4d0b563c6ec51d7b734bae6331e13dd7 to your computer and use it in GitHub Desktop.
dummy-lib release workflow
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions: {} #reset
jobs:
release:
# IMPORTANT: prevent this action from running on forks
if: github.repository == 'barisbll/dummy-lib'
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 6.0.2
- run: pnpm i
- name: Publish to pnpm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment