0.4.0 #46
Workflow file for this run
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
name: Publish toolkit | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_PRIVATE_KEY: ${{ secrets.PGP_SECRET }} | |
PGP_PASSWORD: ${{ secrets.PGP_PASSPHRASE }} | |
jobs: | |
publish: | |
name: Release toolkit and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/[email protected] | |
- name: Setup Scala CLI | |
uses: VirtusLab/scala-cli-setup@main | |
- name: Test changelog compliance | |
run: scala-cli changelog | |
- name: Import GPG key | |
id: import_gpg | |
run: | | |
echo "${{ secrets.PGP_SECRET }}" | base64 --decode > private.key | |
gpg --import --batch --yes --pinentry-mode loopback --passphrase "${{ secrets.PGP_PASSPHRASE }}" private.key | |
echo "fingerprint=$(gpg --list-secret-keys --with-colons | awk -F: '/^fpr:/ { print $10 }')" >> "$GITHUB_OUTPUT" | |
rm private.key | |
env: | |
gpg_private_key: ${{ secrets.PGP_SECRET }} | |
passphrase: ${{ secrets.PGP_PASSPHRASE }} | |
- name: Local publish Toolkit for JVM | |
run: scala-cli --power publish local --cross Toolkit.scala publish-conf.scala --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Local publish Toolkit for native | |
run: scala-cli --power publish local --cross --native Toolkit.scala publish-conf.scala --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Local publish Toolkit for JS | |
run: scala-cli --power publish local --cross --js Toolkit.js.scala publish-conf.scala --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit for JVM | |
run: scala-cli --power publish --cross Toolkit.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit for native | |
run: scala-cli --power publish --cross --native Toolkit.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit for JS | |
run: scala-cli --power publish --cross --js Toolkit.js.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit Test for JVM | |
run: scala-cli --power publish --dependency "org.scala-lang::toolkit::$TOOLKIT_VERSION" --cross ToolkitTest.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
TOOLKIT_VERSION: ${{ github.ref_name }} | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit Test for native | |
run: scala-cli --power publish --dependency "org.scala-lang::toolkit::$TOOLKIT_VERSION" --cross --native ToolkitTest.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD | |
continue-on-error: true | |
env: | |
TOOLKIT_VERSION: ${{ github.ref_name }} | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Publish Toolkit Test for JS | |
run: scala-cli --power publish --dependency "org.scala-lang::toolkit::$TOOLKIT_VERSION" --cross --js ToolkitTest.scala publish-conf.scala --password env:OSSRH_PASSWORD --user env:OSSRH_USERNAME --gpg-key $PGP_KEY_ID --gpg-option --pinentry-mode --gpg-option loopback --gpg-option --passphrase --gpg-option $PGP_PASSWORD && break | |
continue-on-error: true | |
env: | |
TOOLKIT_VERSION: ${{ github.ref_name }} | |
PGP_KEY_ID: ${{ steps.import_gpg.outputs.fingerprint }} |