chore: add debug step for github workflow #5
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/scripts/compute-version.js)" | |
- name: Print computed version | |
run: echo "Computed version is ${{ steps.next_version.outputs.version }}" | |
- 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 v${{ steps.next_version.outputs.version }} | |
- name: Push git tag | |
run: git push origin ${{ steps.next_version.outputs.version }} |