Merge pull request #1478 from alexarchambault/tweak-build #240
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: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
release: | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
with: | |
jvm: 8 | |
- run: echo "$PGP_SECRET" | base64 --decode | gpg --batch --import | |
shell: bash | |
env: | |
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }} | |
- run: | | |
mv .mill-jvm-opts .mill-jvm-opts.bak | |
cat .mill-jvm-opts.bak | grep -v Xmx > .mill-jvm-opts | |
# sometimes running into memory issues when attempting __.publishLocal or __.publishArtifacts upfront | |
for SV in $(./mill dev.scalaVersions); do | |
./mill -i '__['"$SV"'].compile' | |
./mill -i '__['"$SV"'].docJar' | |
./mill -i '__['"$SV"'].publishLocal' | |
done | |
./mill -i __.publishLocal | |
./mill -i ci.publishSonatype --tasks __.publishArtifacts | |
shell: bash | |
env: | |
PGP_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
upload-launcher: | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
with: | |
jvm: 8 | |
- run: ./mill -i ci.uploadLaunchers | |
if: startsWith(github.ref, 'refs/tags/v') | |
shell: bash | |
env: | |
UPLOAD_GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
update-docker-images: | |
needs: release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'almond-sh/almond' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
with: | |
jvm: 8 | |
- run: scripts/update-docker-images.sh | |
shell: bash | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
update-website: | |
needs: [upload-launcher, update-docker-images] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
with: | |
jvm: 17 | |
apps: cs | |
- run: | | |
./mill docs.generate --npm-install --yarn-run-build | |
scripts/website0/versioned-docs.sh --update | |
if: startsWith(github.ref, 'refs/tags/v') | |
shell: bash | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
WEBSITE_DIR: docs/website | |
VERSIONED_DOCS_REPO: almond-sh/versioned-docs | |
- run: | | |
scripts/website0/versioned-docs.sh | |
./mill docs.generate --npm-install --yarn-run-build --relativize | |
scripts/website0/push-website.sh | |
shell: bash | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
WEBSITE_DIR: docs/website | |
REPO: almond-sh/almond | |
VERSIONED_DOCS_REPO: almond-sh/versioned-docs |