ci: test pr tag #1
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 Release Tag | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
types: | |
- closed | |
jobs: | |
create-tag: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Sync node version and setup cache | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: create and push tag | |
run: | | |
git --version | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git tag "v$(node -e "console.log(require('./package.json').version)")" | |
git log --oneline --graph | |
git push --tags | |