release-wasm4s #39
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: release-wasm4s | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version number" | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup jdk11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- uses: coursier/cache-action@v5 | |
- name: change version | |
run: | | |
echo 'ThisBuild / version := "${{ inputs.version }}"' > version.sbt | |
- name: build-libs | |
id: build-libs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
run: | | |
mkdir -p ~/.sbt/gpg | |
echo "$PGP_SECRET" | base64 --decode > ~/.sbt/gpg/secring.key | |
gpg --batch --pinentry-mode=loopback --yes --passphrase "$PGP_PASSPHRASE" --import ~/.sbt/gpg/secring.key | |
gpg --batch --pinentry-mode=loopback --yes --passphrase "$PGP_PASSPHRASE" --export-secret-key 4EFDC6FC2DEC936B13B7478C2F8C0F4E1D397E7F > ~/.sbt/gpg/secring.gpg | |
sh ./update-extism.sh | |
sbt ';+compile;+test;+package;+assembly;+doc;+packageDoc;+publishSigned;sonatypeBundleRelease' | |
# sbt ';+compile;+test;+package;+assembly;+publish' | |
# sbt ';+compile;+test;+package;+assembly' | |
- name: Generate SHA-256 | |
run: | | |
shasum -a 256 ./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar | cut -d ' ' -f 1 > ./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar.sha256 | |
shasum -a 256 ./target/scala-2.13/wasm4s-bundle_2.13-${{ inputs.version }}.jar | cut -d ' ' -f 1 > ./target/scala-2.13/wasm4s-bundle_2.13-${{ inputs.version }}.jar.sha256 | |
shasum -a 256 ./target/scala-2.12/wasm4s_2.12-${{ inputs.version }}.jar | cut -d ' ' -f 1 > ./target/scala-2.12/wasm4s_2.12-${{ inputs.version }}.jar.sha256 | |
shasum -a 256 ./target/scala-2.12/wasm4s-bundle_2.12-${{ inputs.version }}.jar | cut -d ' ' -f 1 > ./target/scala-2.12/wasm4s-bundle_2.12-${{ inputs.version }}.jar.sha256 | |
- name: Release binary and SHA-256 checksum to GitHub | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ inputs.version }} | |
files: | | |
./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar | |
./target/scala-2.13/wasm4s-bundle_2.13-${{ inputs.version }}.jar | |
./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar.sha256 | |
./target/scala-2.13/wasm4s-bundle_2.13-${{ inputs.version }}.jar.sha256 | |
./target/scala-2.12/wasm4s_2.12-${{ inputs.version }}.jar | |
./target/scala-2.12/wasm4s-bundle_2.12-${{ inputs.version }}.jar | |
./target/scala-2.12/wasm4s_2.12-${{ inputs.version }}.jar.sha256 | |
./target/scala-2.12/wasm4s-bundle_2.12-${{ inputs.version }}.jar.sha256 |