release: runner@0.0.13 #99
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: Add GitHub Release Tag | |
on: | |
push: | |
tags: | |
- '*@*' # Push events to matching *@*, i.e. eslint-config@1.0.0 | |
# $GITHUB_REF_NAME - https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables | |
jobs: | |
ci: | |
if: ${{ !contains(github.event.head_commit.message, 'skip-ci') }} | |
uses: ./.github/workflows/ci.yml | |
with: | |
force: true | |
release: | |
if: ${{ (contains(github.event.head_commit.message, 'skip-ci') && always()) || success() }} | |
needs: ci | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get pkgName for tag | |
id: tag | |
run: | | |
# `%@*` truncates @ and version number from the right side. | |
# https://stackoverflow.com/questions/9532654/expression-after-last-specific-character | |
pkgName=${GITHUB_REF_NAME%@*} | |
echo "::set-output name=pkgName::$pkgName" | |
- name: Create Release for Tag | |
id: release_tag | |
uses: yyx990803/release-tag@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
body: | | |
Please refer to [CHANGELOG.md](https://github.com/Doubleshotjs/doubleshot/blob/${{ github.ref_name }}/packages/${{ steps.tag.outputs.pkgName }}/CHANGELOG.md) for details. | |
publish: | |
if: ${{ (contains(github.event.head_commit.message, 'skip-ci') && needs.release.result == 'success' && always()) || success() }} | |
needs: release | |
uses: ./.github/workflows/publish.yml | |
secrets: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |