Merge pull request #284 from PrefectHQ/dependabot/npm_and_yarn/types/… #91
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 | |
- v1 | |
jobs: | |
build-and-publish: | |
name: Build & Publish Release | |
runs-on: ubuntu-latest | |
environment: 'prod' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install dependencies | |
run: npm ci | |
- name: Build package | |
run: npm run build | |
- name: Publish Package | |
id: publish | |
uses: JS-DevTools/npm-publish@v2 | |
with: | |
token: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
access: public | |
strategy: upgrade | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.publish.outputs.version }} | |
run: | | |
gh release create "$tag" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="Release ${tag#v}" \ | |
--generate-notes |