Skip to content

Commit

Permalink
feat: separate the workflow into pre-do-post sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Arc-E-Tect committed Jul 21, 2024
1 parent 29fdd64 commit 4709ad9
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master

jobs:
release:
setup_release:
name: Release
permissions:
contents: write
Expand Down Expand Up @@ -48,6 +48,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

outputs:
new_tag_version: ${{ steps.next_release_version.outputs.new_tag_version }}

update_version_in_adoc:
needs: setup_release
if: ${{ needs.setup_release.outputs.new_tag_version != '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Print orig file
run: |
FILE="test.adoc"
Expand Down Expand Up @@ -80,6 +91,21 @@ jobs:
FILE="test.adoc"
cat $FILE
- name: Upload updated file
uses: actions/upload-artifact@v4
with:
name: updated-file
path: test.adoc

continue_release:
needs: update_version_in_adoc
runs-on: ubuntu-latest
steps:
- name: Download updated file
uses: actions/download-artifact@v4
with:
name: updated-file

- name: Release with next Semantic Version
if: ${{steps.next_release_version.outputs.new_tag_version != ''}}
run: npx semantic-release
Expand Down

0 comments on commit 4709ad9

Please sign in to comment.