test #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 6.32.9 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Create Changesets version | |
run: | | |
if [ "${{ github.ref }}" == "refs/heads/dev" ]; then | |
pnpx changeset pre enter rc | |
fi | |
pnpx changeset version | |
- name: Push Changeset version update | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Version Packages" | |
git push | |
- name: Create GitHub Release | |
uses: changesets/action@v1 | |
with: | |
publish: false | |
version: false | |
changelog: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Echo publish action | |
run: echo "This is where the package would be published to npm." |