Skip to content

chore: without changeset (#1200) #4

chore: without changeset (#1200)

chore: without changeset (#1200) #4

Workflow file for this run

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"