feat!: remove test function 2 #3
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: Create new tag | |
# 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 ci | |
- name: Determine next version | |
id: next_version | |
run: echo "::set-output name=version::$(node .github/workflows/scripts/compute-version.js)" | |
- name: Print computed version | |
run: echo "Computed version is ${{ steps.next_version.outputs.version }}" | |
- name: Setup git user | |
run: | | |
git config --global user.name "github_action" | |
git config --global user.email "github_action@test.com" | |
- 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: Push git tag | |
run: git push --tags |