Release #25
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
on: | |
workflow_run: | |
workflows: [validate] | |
branches: [main] | |
types: | |
- completed | |
name: Release | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Prepare prerelease semantic | |
if: github.ref == 'refs/heads/main' | |
run: mv .releaserc.prerelease.yaml .releaserc.yaml | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v2 | |
id: semantic # Need an `id` for output variables | |
with: | |
semantic_version: 17 | |
extra_plugins: | | |
@semantic-release/changelog@5 | |
@semantic-release/exec@5 | |
@semantic-release/git@9 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Do something when a new release published | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: | | |
echo ${{ steps.semantic.outputs.new_release_version }} | |
echo ${{ steps.semantic.outputs.new_release_major_version }} | |
echo ${{ steps.semantic.outputs.new_release_minor_version }} | |
echo ${{ steps.semantic.outputs.new_release_patch_version }} | |
- name: Upload Version and Changelog as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: versionandchangelog | |
path: | | |
VERSION | |
CHANGELOG.md |