Skip to content

Merge pull request #192 from PrefectHQ/release-2.0.4 #52

Merge pull request #192 from PrefectHQ/release-2.0.4

Merge pull request #192 from PrefectHQ/release-2.0.4 #52

Workflow file for this run

name: Release
on:
push:
paths:
- package.json
branches:
- main
jobs:
version-change-check:
name: Check Package Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Package Version
uses: EndBug/[email protected]
id: check
with:
diff-search: true
file-name: ./package.json
- name: Cancel
if: steps.check.outputs.changed == 'false'
uses: andymckay/[email protected]
build-and-publish:
name: Build & Publish Release
runs-on: ubuntu-latest
needs: [version-change-check]
environment: 'prod'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci install
- name: Build package
run: npm run build
- name: Publish Package
id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
access: public
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.publish.outputs.version }}
release_name: Release ${{ steps.publish.outputs.version }}
body: |
Please refer to [CHANGELOG.md](https://github.com/PrefectHQ/graphs/blob/main/CHANGELOG.md) for details.