Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Farewell

Farewell #773

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
tags: [v*]
pull_request:
branches: ["**"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-sbt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v14
with:
java-version: adopt@1.11
- name: Run tests with sbt
run: sbt test
- name: Run sbt-plugin tests
run: sbt scripted
build-mill:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v14
with:
java-version: adopt@1.11
- name: Run tests with mill
run: ./millw _.test
publish-sbt:
name: Publish release with sbt
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
needs: [build-sbt, build-mill]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v14
with:
java-version: adopt@1.11
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
publish-mill:
name: Publish release with mill
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
needs: [build-sbt, build-mill]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v14
with:
java-version: adopt@1.11
- name: Setup GPG secrets for publish
run: |
gpg --version
cat <(echo "${{ secrets.PGP_SECRET }}") | base64 --decode | gpg --batch --import
- name: Publish to maven repository
run: |
./millw -i mill.scalalib.PublishModule/publishAll \
--sonatypeCreds "${{ secrets.SONATYPE_USERNAME }}:${{ secrets.SONATYPE_PASSWORD }}" \
--sonatypeUri "https://s01.oss.sonatype.org/service/local" \
--gpgArgs "--passphrase=${{ secrets.PGP_PASSPHRASE }},--batch,--yes,-a,-b,--pinentry-mode,loopback" \
--publishArtifacts _[2.13.8].publishArtifacts \
--release true \
--signed true
publish-notes:
name: Publish release notes
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
needs: [publish-sbt, publish-mill]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Extract version from commit message
run: |
version=${GITHUB_REF/refs\/tags\/v/}
echo "VERSION=$version" >> $GITHUB_ENV
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: Publish release notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: true
name: "v${{ env.VERSION }}"
tag: "v${{ env.VERSION }}"
version: "v${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}