Skip to content

Commit

Permalink
Merge pull request #2 from hoangmaihuy/fix-workflow
Browse files Browse the repository at this point in the history
fix: Github workflow
  • Loading branch information
hoangmaihuy authored Dec 1, 2023
2 parents 177a1ff + abf04b1 commit 8ea914b
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

jobs:
build:
name: Build/Test
strategy:
fail-fast: false
matrix:
Expand All @@ -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
Expand Down

0 comments on commit 8ea914b

Please sign in to comment.