diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c93f91..463f815 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,7 @@ concurrency: jobs: build: + name: Build/Test strategy: fail-fast: false matrix: @@ -24,43 +25,49 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java-version }} distribution: temurin - # Check publishing - - run: ./millw -i __.publishLocal $(pwd)/testRepo + - name: Check publishing local + run: ./millw -i __.publishLocal $(pwd)/testRepo - # Test - - run: ./millw -i -k __.test + - name: Test + run: ./millw -i -k __.test publish: + name: Publish to Maven Central needs: [build] if: github.repository == 'hoangmaihuy/mill-missinglink' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest concurrency: publish-{{ github.sha }} steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-java@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 with: java-version: 8 distribution: temurin - - run: ./millw -i __.publishLocal testRepo + - name: Check publishing local + run: ./millw -i __.publishLocal testRepo - name: Setup GPG secrets run: | gpg --version - cat <(echo "${{ secrets.GPG_SECRET_KEY }}") | base64 --decode | gpg --batch --import + cat <(echo "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import gpg --list-secret-keys --keyid-format LONG - name: Publish to Maven Central