Skip to content

Commit

Permalink
cicd: Fixed release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Ruaux committed May 31, 2023
1 parent 8d36ebc commit 440e383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
name: Release
needs: [precheck, jlink]
runs-on: ubuntu-latest
outputs:
hashes: ${{ steps.slsa.outputs.HASHES }}
tagname: ${{ steps.slsa.outputs.TAGNAME }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -70,11 +67,4 @@ jobs:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
- name: SLSA
shell: bash
id: slsa
run: |
echo "HASHES=$(cat out/jreleaser/checksums/checksums_sha256.txt | base64 -w0)" >> "$GITHUB_OUTPUT"
echo "TAGNAME=$(grep tagName out/jreleaser/output.properties | awk -F'=' '{print $2}')" >> "$GITHUB_OUTPUT"
out/jreleaser/output.properties
30 changes: 4 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
git add VERSION
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ github.event.inputs.version }}/g" README.adoc
git config --global user.email "${{ secrets.COMMIT_EMAIL }}"
git config --global user.name "Andres Almiray"
git config --global user.name "Julien Ruaux"
git commit -a -m "Releasing version ${{ github.event.inputs.version }}"
git push origin main
Expand All @@ -48,9 +48,6 @@ jobs:
name: Release
needs: [precheck, jlink]
runs-on: ubuntu-latest
outputs:
hashes: ${{ steps.slsa.outputs.HASHES }}
tagname: ${{ steps.slsa.outputs.TAGNAME }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -78,12 +75,8 @@ jobs:
cache: gradle

- name: Deploy
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: |
./gradlew -Pprofile=sbom -PreproducibleBuild=true publishPlugins publish -S
./gradlew cleanupStagedRepository
./gradlew -Pprofile=release -PreproducibleBuild=true publish -S
- name: Upload deploy artifacts
uses: actions/upload-artifact@v3
Expand All @@ -107,17 +100,9 @@ jobs:
JRELEASER_DOCKER_DEFAULT_PASSWORD: ${{ secrets.JRELEASER_DOCKER_PASSWORD }}
JRELEASER_SDKMAN_CONSUMER_KEY: ${{ secrets.SDKMAN_CONSUMER_KEY }}
JRELEASER_SDKMAN_CONSUMER_TOKEN: ${{ secrets.SDKMAN_CONSUMER_TOKEN }}
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
JRELEASER_MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
JRELEASER_HTTP_NOTICEABLE_PASSWORD: ${{ secrets.NOTICEABLE_APIKEY }}
JRELEASER_OPENCOLLECTIVE_TOKEN: ${{ secrets.OPENCOLLECTIVE_TOKEN }}
NOTICEABLE_AUTHOR_EMAIL: ${{ secrets.NOTICEABLE_AUTHOR_EMAIL }}
NOTICEABLE_PROJECTID: ${{ secrets.NOTICEABLE_PROJECTID }}
JRELEASER_SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: JReleaser release output
if: always()
Expand All @@ -126,11 +111,4 @@ jobs:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
- name: SLSA
shell: bash
id: slsa
run: |
echo "HASHES=$(cat out/jreleaser/checksums/checksums_sha256.txt | base64 -w0)" >> "$GITHUB_OUTPUT"
echo "TAGNAME=$(grep tagName out/jreleaser/output.properties | awk -F'=' '{print $2}')" >> "$GITHUB_OUTPUT"
out/jreleaser/output.properties

0 comments on commit 440e383

Please sign in to comment.