🐎 ci: release workflow test #1
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 Tag and Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install dependencies | |
run: npm ci | |
- name: Get version | |
id: package | |
run: echo "::set-output name=version::$(node -p "require('./package.json').version")" | |
- name: Create Tag | |
run: git tag ${{ steps.package.outputs.version }} | |
- name: Push Tag | |
run: git push origin ${{ steps.package.outputs.version }} | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.package.outputs.version }} | |
release_name: Release ${{ steps.package.outputs.version }} |