Skip to content

chore(ci): rename publish-npm job #3

chore(ci): rename publish-npm job

chore(ci): rename publish-npm job #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
# Publish a new package to NPM:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Dependencies
run: npm install
- name: Create Release Pull Request / NPM Publish
uses: changesets/action@v1
with:
publish: npm run publish-changeset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Create a new tag release on GitHub:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Extract version
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
with:
tag: v${{ env.VERSION }}
name: v${{ env.VERSION }}
draft: false
prerelease: false
allowUpdates: false
skipIfReleaseExists: true
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}