chore: inception #34
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: release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
id-token: write | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
JVM_OPTS: "-Xmx6G" | |
SBT_OPTS: "-Dsbt.ci=true" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_PROD_BUILDPLUGIN }} | |
aws-region: us-east-1 | |
- name: Prepare environment | |
env: | |
PRIVATE_REPOSITORY_SBT: ${{ secrets.PRIVATE_REPOSITORY_SBT }} | |
SONATYPE_SBT: ${{ secrets.SONATYPE_SBT }} | |
SONATYPE_PGP_SECRET: ${{ secrets.SONATYPE_PGP_SECRET }} | |
run: | | |
mkdir --parents ~/.sbt/1.0 || true | |
echo "$PRIVATE_REPOSITORY_SBT" > ~/.sbt/1.0/privateRepository.sbt | |
echo "$SONATYPE_SBT" > ~/.sbt/1.0/sonatype.sbt | |
echo -n "$SONATYPE_PGP_SECRET" | base64 --decode | gpg --batch --import | |
# - name: Cache | |
# No cache for release! We want clean and full release! | |
- name: Release | |
id: release | |
env: | |
PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PASSPHRASE }} | |
run: | | |
sbt "release with-defaults" | |
echo "version=$(cat target/release-info)" # DO NOT REMOVE, because of bad parsing for outputs | |
echo "version=$(cat target/release-info)" >> $GITHUB_OUTPUT | |
- name: Publish on CodeArtifact | |
run: | | |
if [[ "${{ steps.release.outputs.version }}" =~ .*-M[0-9]+ ]]; then | |
aws \ | |
--region us-east-1 \ | |
codeartifact update-package-versions-status \ | |
--domain ${{ secrets.AWS_CODEARTIFACT_DOMAIN }} \ | |
--domain-owner ${{ secrets.AWS_CODEARTIFACT_OWNER }} \ | |
--repository milestones \ | |
--format maven \ | |
--namespace io.gatling \ | |
--package gatling-build-plugin_2.12_1.0 \ | |
--versions "${{ steps.release.outputs.version }}" \ | |
--target-status Published | |
fi |