steedos-platform/.github/workflows/create-release2.yml
2021-10-09 11:28:21 +08:00

37 lines
1001 B
YAML

name: Create Release - v2.x.x
on:
push:
tags:
- 'v2.**'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Set Current Version
run: |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ env.CURRENT_VERSION }}
release_name: v${{ env.CURRENT_VERSION }}
draft: false
prerelease: false