Update dependency com.github.ajalt.clikt:clikt to v5.0.3 (#222) #232
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: build and publish | |
on: | |
push: | |
branches: | |
- trunk | |
tags: | |
- '*' | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- uses: crazy-max/ghaction-docker-meta@v1 | |
id: docker_meta | |
with: | |
images: | | |
jakewharton/dependency-watch | |
ghcr.io/jakewharton/dependency-watch | |
tag-semver: | | |
{{version}} | |
{{major}} | |
{{major}}.{{minor}} | |
- uses: docker/login-action@v3 | |
with: | |
username: jakewharton | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
- run: ./gradlew build | |
- uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
- name: Get version | |
id: get_version | |
if: startsWith(github.ref, 'refs/tags/') | |
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | |
- name: Set SHA | |
id: shasum | |
if: startsWith(github.ref, 'refs/tags/') | |
run: echo ::set-output name=sha::"$(shasum -a 256 build/distributions/dependency-watch.zip | awk '{printf $1}')" | |
- name: Extract release notes | |
id: release_notes | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: ffurrer2/extract-release-notes@v2 | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: ${{ steps.release_notes.outputs.release_notes }} | |
files: build/distributions/dependency-watch.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Bump Brew | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
# Update to ensure we have the latest version which supports arbitrary default branches. | |
brew update | |
brew tap JakeWharton/repo | |
brew bump-formula-pr -f --version=${{ steps.get_version.outputs.version }} --no-browse --no-audit \ | |
--sha256=${{ steps.shasum.outputs.sha }} \ | |
--url="https://github.com/JakeWharton/dependency-watch/releases/download/${{ steps.get_version.outputs.version }}/dependency-watch.zip" \ | |
JakeWharton/repo/dependency-watch |