-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add scmInfo for Sonatype; update sigmastate to v3.2.1; * add snapshot and release workflows; * add ci/import_gpg.sh; * add signing key in build.sbt; * remove `pgp*Ring` vars in build.sbt; * remove .travis.yml;
- Loading branch information
Showing
5 changed files
with
99 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
publish_release: | ||
name: Publish release to Sonatype | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v5 | ||
- name: Import GPG key | ||
run: ci/import_gpg.sh | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
- name: Publish release ${{ github.ref }} | ||
run: sbt publishSigned sonatypeBundleRelease | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
|
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Snapshot | ||
on: | ||
push: | ||
branches: ["*"] | ||
tags-ignore: ["v*"] | ||
jobs: | ||
formatting: | ||
name: Check code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v5 | ||
- name: Run scalafmt | ||
run: sbt scalafmtCheck | ||
|
||
build: | ||
name: Build and run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v5 | ||
- name: Run tests | ||
run: sbt test | ||
|
||
snapshot: | ||
name: Publish snapshot to Sonatype | ||
needs: [build, formatting] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v5 | ||
- name: Publish snapshot ${{ github.ref }} | ||
run: sbt publish | ||
env: | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# setting up gpg2 for reading passphrase from parameters | ||
# via https://github.com/beautiful-scala/scalastyle/blob/master/.github/workflows/release.yml#L16 | ||
# from https://github.com/olafurpg/sbt-ci-release/issues/95 | ||
|
||
# setup gpg | ||
mkdir ~/.gnupg && chmod 700 ~/.gnupg | ||
echo use-agent >> ~/.gnupg/gpg.conf | ||
echo pinentry-mode loopback >> ~/.gnupg/gpg.conf | ||
echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf | ||
chmod 600 ~/.gnupg/* | ||
echo RELOADAGENT | gpg-connect-agent | ||
|
||
# public key should be submitted to any public key server | ||
# e.g. http://pgp.mit.edu/pks/add | ||
# on macOS: gpg --armor --export [id] | pbcopy | ||
|
||
# decode private key | ||
# private key should be previously exported with (macOS): | ||
# gpg --export-secret-keys [id] | base64 | pbcopy | ||
# and stored as github repository secret under the following name (see env var name below) | ||
printf "$GPG_SIGNING_KEY" | base64 --decode > ~/.gnupg/private.key | ||
|
||
# import key | ||
gpg --no-tty --batch --yes --import ~/.gnupg/private.key | ||
|