Skip to content

Commit

Permalink
ci(GitHub): split release workflow in two separate jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Art Shendrik <[email protected]>
  • Loading branch information
amal committed May 26, 2024
1 parent 63b7eb3 commit 4d38d9c
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,15 @@ env:
-Dorg.gradle.vfs.watch=false
jobs:
release:
gh_release:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: audit
allowed-endpoints: >
api.github.com:443
dl.google.com:443
docs.oracle.com:443
github.com:443
jcenter.bintray.com:443
kotlinlang.org:443
objects.githubusercontent.com:443
plugins-artifacts.gradle.org:443
plugins.gradle.org:443
s3.amazonaws.com:443
scans-in.gradle.com:443
services.gradle.org:443

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -65,6 +49,30 @@ jobs:
echo "RELEASE_PRE=$RELEASE_PRE" >> $GITHUB_ENV
echo "RELEASE_SUFFIX=$RELEASE_SUFFIX" >> $GITHUB_ENV
- name: GitHub Release
# https://github.com/anton-yurchenko/git-release#readme
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "true"
PRE_RELEASE: "${{ env.RELEASE_PRE }}"
RELEASE_NAME_SUFFIX: "${{ env.RELEASE_SUFFIX }}"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"

publish_release:
runs-on: macos-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: audit

- name: Checkout
uses: actions/checkout@v4

- name: 'Set up JDK 22'
uses: actions/setup-java@v4
with:
Expand All @@ -78,17 +86,6 @@ jobs:
cache-disabled: true
cache-read-only: true

- name: GitHub Release
# https://github.com/anton-yurchenko/git-release#readme
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "true"
PRE_RELEASE: "${{ env.RELEASE_PRE }}"
RELEASE_NAME_SUFFIX: "${{ env.RELEASE_SUFFIX }}"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"

- name: Publish plugin
if: always() && github.repository == 'fluxo-kt/fluxo-kmp-conf'
env:
Expand All @@ -100,5 +97,6 @@ jobs:
-Pgradle.publish.key="${{ secrets.GRADLE_PUBLISH_KEY }}"
-Pgradle.publish.secret="${{ secrets.GRADLE_PUBLISH_SECRET }}"
# References
# https://github.com/studiometa/vue-mapbox-gl/blob/8c3ca5a/.github/workflows/release.yml#L26

0 comments on commit 4d38d9c

Please sign in to comment.