Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
release:
types:
- released
workflow_dispatch:
inputs:
module:
type: choice
description: Which module to release
options:
- From Tag
- scala-pekko-http
jobs:
publish:
name: 'Publish release'
runs-on: ubuntu-20.04
steps:
- name: 'Extract project from tag'
id: set-project-from-tag
run: |
module="${{ github.event.inputs.module }}"
if [ -z "$module" ] || [ "$module" = "From Tag" ]; then
module="$(echo "$GITHUB_REF" | sed 's~^refs/tags/\(.*\)-v[0-9.]\+$~\1~')"
echo "extract project: ${GITHUB_REF}, ${module}"
else
echo "Using supplied module: $module"
fi
echo "module=$module" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 14
- name: 'Print versions'
run: |
java -version
gpg --version
- name: 'Publish artifacts [scala-pekko-http]'
if: ${{ steps.set-project-from-tag.outputs.module == 'scala-pekko-http' }}
run: sbt 'show version' "project guardrail-scala-pekko-http" clean compile versionCheck test ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GUARDRAIL_RELEASE_MODULE: ${{ steps.set-project-from-tag.outputs.module }}