Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Create semantic-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar authored Sep 26, 2023
1 parent 1ea93c4 commit d8e7a6a
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Semantic Release

run-name: Semantic Release from ${{ github.ref_name }}

on:
push:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
semantic:
name: Determine version
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
new_release_published: ${{ steps.release.outputs.new_release_published }}
new_release_version: ${{ steps.release.outputs.new_release_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Semantic release
id: release
uses: cycjimmy/semantic-release-action@v4
with:
dry_run: true
release:
name: Release version
runs-on: ubuntu-latest
timeout-minutes: 30
needs: semantic
if: ${{ needs.semantic.outputs.new_release_published == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Release version ${{ steps.release.outputs.new_release_version }} on ${{ github.ref_name }}
run: gh workflow run version.yml --raw-field version=$VERSION --ref $BRANCH
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
VERSION: ${{ needs.semantic.outputs.new_release_version }}
BRANCH: ${{ github.ref_name }}

0 comments on commit d8e7a6a

Please sign in to comment.