Skip to content

publish on releases #46

publish on releases

publish on releases #46

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Scala CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
release:
types: [created]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Run tests
run: ./mill _.test
- name: Generate smithy representation
run: ./mill lspSmithy.run
- name: Run smithy4s codegen
run: ./mill exampleClient.compile
- name: Ensure working tree is clean
run: |
# ensure working tree in git is clean, otherwise fail
OUT=$(git status --porcelain)
if [ -n "$OUT" ]; then
echo "Working tree is not clean, aborting. Some uncommitted changes were found. Here's a list of them:"
# git diff won't show any changes for new untracked files so we need both diff and status
git diff
git status
exit 1
fi
- run: ./mill mill.scalalib.SonatypeCentralPublishModule/
env:
MILL_PGP_SECRET_BASE64: ${{ secrets.PGP_SECRET }}
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}