Skip to content

fix: release workflow #25

fix: release workflow

fix: release workflow #25

Workflow file for this run

name: Release
on:
push:
branches: ["main", "[0-9].*.*"]
jobs:
release:
runs-on: ubuntu-latest
outputs:
new_tag_version: ${{ steps.tag_version.outputs.new_tag_version }}
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
- name: Install dependencies πŸ‘¨πŸ»β€
run: yarn install
- name: Dry run to get the next release version
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export NEXT_TAG_VERSION=$(npx semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/')
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT
- name: Release πŸš€
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Version
run: echo "The version is ${{ steps.tag_version.outputs.new_tag_version }}"
publish:
needs: [release]
uses: ./.github/workflows/publish.yml
with:
version: ${{ needs.release.outputs.new_tag_version}}
secrets: inherit