1.11.7 #309
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: | |
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/version-check@v2.1.0 | |
id: check | |
with: | |
diff-search: true | |
file-name: ./package.json | |
- name: Cancel | |
if: steps.check.outputs.changed == 'false' | |
uses: andymckay/cancel-action@0.2 | |
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/prefect-design/blob/main/CHANGELOG.md) for details. |