Skip to content

Commit

Permalink
separate build from pulish
Browse files Browse the repository at this point in the history
  • Loading branch information
tvichiansakd committed Sep 19, 2024
1 parent 19259fe commit 1832a87
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
continue-on-error: true
continue-on-error: true
- name: Verify Published Artifact
env:
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/scalabuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
MAJOR_MINOR_VERSION: 0.1.
jobs:
build:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -31,6 +31,27 @@ jobs:
- name: Build project
working-directory: scalatest-listener
run: sbt +compile
release:
name: Release
needs: build
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Prepare and Sign Artifact
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_SECRET_KEY }}
Expand All @@ -44,7 +65,7 @@ jobs:
echo "$GPG_PUBLIC_KEY" | gpg --import --batch
mkdir -p $HOME/.sbt/gpg
gpg --batch --pinentry-mode=loopback --yes --passphrase $GPG_PASSPHRASE --output $HOME/.sbt/gpg/secring.asc --export-secret-key --armor
sbt +publishSigned
sbt +compile +publishSigned
cd $BUNDLE_PATH && zip -r ${GITHUB_WORKSPACE}/bundle.zip .
- name: Publish to Maven Central
env:
Expand Down

0 comments on commit 1832a87

Please sign in to comment.