chore: update path to compute version script #6
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 and Deploy | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: write # This is required for actions/checkout | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- master | |
jobs: | |
release-and-deploy: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch all history to compute release notes | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install | |
- name: Determine next version | |
id: next_version | |
run: echo "::set-output name=version::$(node .github/workflows/scripts/compute-version.js)" | |
- name: Update package.json | |
run: npm version ${{ steps.next_version.outputs.version }} | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: package.json | |
message: "chore: Bumped version in package.json" | |
default_author: github_actions | |
- name: Create git tag | |
run: git tag ${{ steps.next_version.outputs.version }} | |
- name: Push git tag | |
run: git push origin ${{ steps.next_version.outputs.version }} |