main #285
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: main | |
on: | |
push: | |
branches: "*" | |
tags: "*" | |
pull_request: | |
schedule: | |
- cron: "0 6 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set-up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "8" | |
distribution: "temurin" | |
cache: maven | |
- name: clone ctp-anon-minimal | |
uses: actions/checkout@v4 | |
with: | |
repository: smi/ctp-anon-minimal | |
path: ./ctp-anon-minimal | |
- name: install vendor deps | |
run: | | |
cd ./ctp-anon-minimal | |
./scripts/build/01-reset-submodules.bash | |
./scripts/build/06-install-vendor-deps.bash | |
- name: package | |
env: | |
MVN_REPO_USERNAME: ${{ github.actor }} | |
MVN_REPO_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn -B -ntp --settings .github/workflows/settings.xml package | |
- name: "upload jar" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ github.event.repository.name }}-${{ github.sha }}" | |
path: target/ctp-anon-cli*.jar | |
if-no-files-found: error | |
release: | |
if: contains(github.ref, 'refs/tags/v') | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./dist | |
- name: upload release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./dist/**/*.jar | |
fail_on_unmatched_files: true | |
generate_release_notes: true |