Skip to content

Version Packages (#8) #8

Version Packages (#8)

Version Packages (#8) #8

Workflow file for this run

name: Release
on:
push:
branches:
- develop
jobs:
release:
# prevents this action from running on forks
if: github.repository == 'UNDP-Data/date-picker-svelte'
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Changesets Release
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: install dependencies
run: npm ci
- name: build packages
run: npm run build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npx changeset publish
version: npx changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}