Release Beta v2.0.0-beta.4 #44
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: Publish Tag | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
job1: | |
name: Publish Tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set_var | |
name: Get Version | |
run: | | |
content=`cat ./package.json` | |
# the following lines are only required for multi line json | |
content="${content//'%'/'%25'}" | |
content="${content//$'\n'/'%0A'}" | |
content="${content//$'\r'/'%0D'}" | |
# end of optional handling for multi line json | |
echo "::set-output name=packageJson::$content" | |
- name: Push Tag | |
id: tag | |
uses: anothrNick/github-tag-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
CUSTOM_TAG: "v${{ fromJson(steps.set_var.outputs.packageJson).version }}" | |
job2: | |
needs: job1 | |
name: Publish Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set_var | |
name: Get Version | |
run: | | |
content=`cat ./package.json` | |
# the following lines are only required for multi line json | |
content="${content//'%'/'%25'}" | |
content="${content//$'\n'/'%0A'}" | |
content="${content//$'\r'/'%0D'}" | |
# end of optional handling for multi line json | |
echo "::set-output name=packageJson::$content" | |
- name: Echo Debug | |
run: | | |
echo "${{ fromJson(steps.set_var.outputs.packageJson).version }}" | |
- name: Create GitHub release | |
uses: Roang-zero1/github-create-release-action@master | |
with: | |
prerelease_regex: ^v[0-9]\.[0-9]\.[0-9]\- | |
created_tag: v${{ fromJson(steps.set_var.outputs.packageJson).version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |