fix publishing #234
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: ci | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: ['11', '17'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Run tests | |
run: ./mill -i '__.{publishArtifacts,test}' | |
check-binary-compatibility: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Check Binary Compatibility | |
run: ./mill -i __.mimaReportBinaryIssues | |
publish-sonatype: | |
# when in master repo, publish all tags and manual runs on main | |
if: github.repository == 'com-lihaoyi/utest' && contains(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
# only run one publish job for the same sha at the same time | |
# e.g. when a main-branch push is also tagged | |
concurrency: publish-sonatype-${{ github.sha }} | |
env: | |
MILL_STABLE_VERSION: 1 | |
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_SECRET }} | |
MILL_PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PASSWORD }} | |
LANG: "en_US.UTF-8" | |
LC_MESSAGES: "en_US.UTF-8" | |
LC_ALL: "en_US.UTF-8" | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: . | |
name: publish-artifacts | |
- run: git reset --hard | |
- uses: coursier/cache-action@v6 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: temurin | |
- run: ./mill -i mill.scalalib.PublishModule/ | |
- name: Create GitHub Release | |
id: create_gh_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false |