-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a custom GH action to publish a new release only on git tag (…
…#629) * Introduce a custom GH action to publish a new release only on git tag * add versionPolicyCheck to the release action Co-authored-by: Mareks Rampāns <8796159+mr-git@users.noreply.github.com> --------- Co-authored-by: Mareks Rampāns <8796159+mr-git@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
65 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,53 @@ | ||
name: Publish Release | ||
name: Test and publish a new release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
branches: [master] | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
SBT_CREDENTIALS: '.credentials' | ||
|
||
jobs: | ||
release: | ||
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v1 | ||
secrets: inherit | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: coursier/cache-action@v6 | ||
|
||
- name: setup Java and SBT | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'oracle' | ||
cache: 'sbt' | ||
|
||
- name: setup credentials | ||
run: | | ||
echo "realm=Artifactory Realm" >> ${{ env.SBT_CREDENTIALS }} | ||
echo "host=evolution.jfrog.io" >> ${{ env.SBT_CREDENTIALS }} | ||
echo "user=github-publish" >> ${{ env.SBT_CREDENTIALS }} | ||
echo "password=${{secrets.JFROG_ACCESS_TOKEN}}" >> ${{ env.SBT_CREDENTIALS }} | ||
- name: check, test and package | ||
run: sbt "clean; versionPolicyCheck; +all test package" | ||
|
||
- name: publish on JFrog Artifactory | ||
run: sbt "+publish" | ||
|
||
- name: cleanup credentials | ||
if: always() | ||
run: rm -rf ${{ env.SBT_CREDENTIALS }} | ||
|
||
- name: delete tag | ||
if: failure() | ||
run: git push --delete origin ${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.9.6 | ||
sbt.version=1.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.