Skip to content

nightly-published

nightly-published #110

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v0.5.*'
workflow_dispatch:
repository_dispatch:
types: [nightly-published]
jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
if: github.repository == 'scala-native/scala-native-cli'
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
- name: Setup PGP Key
run: |
echo -n "$PGP_SECRET" | base64 --decode | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Compile everything
run: sbt "+Test/compile"
- name: Publish release
env:
MAVEN_USER: "${{ secrets.SONATYPE_USER }}"
MAVEN_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
PGP_PASSPHRASE: "${{ secrets.PGP_PASSWORD }}"
run: sbt "clean;+cli/cliPack; +cli/publishSigned"
- name: Create release artifacts
run: |
version=$(sbt "print cli/version" | grep . | tail -n 2 | head -n 1)
echo "This build version: $version"
./scripts/dist.sh $version
- name: Archive CLI artifacts
uses: actions/upload-artifact@v3
with:
name: scala-native-cli
path: release/