chore: without changeset (#1200) #4
Workflow file for this run
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: | |
- chore/add-chagesets | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
outputs: | |
published: ${{ steps.changesets.outputs.published }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: RomanHotsiy/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: echo "TESTING PUSHING TO NPM!!!" # release | |
commit: "chore: 🔖 release new versions" | |
title: "chore: 🔖 release new versions" | |
version: | | |
npx changeset version | |
npm i | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Check if changesets were published | |
if: steps.changesets.outputs.published == 'true' | |
run: echo "PUBLISHED -- FROM THE SAME JOB" | |
test-if-published: | |
needs: [release] | |
if: needs.release.outputs.published == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test if published | |
run: echo "PUBLISHED -- FROM A DIFFERENT JOB" |