diff --git a/.github/workflows/build_mainline.yml b/.github/workflows/build_mainline.yml index 4109481..b91acdc 100644 --- a/.github/workflows/build_mainline.yml +++ b/.github/workflows/build_mainline.yml @@ -1,9 +1,8 @@ -name: Build [mainline] + name: Build [mainline] on: push: branches: - main - - main_** jobs: build: @@ -15,9 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 + env: + GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} # Needed to get PR information, if any with: ref: ${{ github.head_ref }} - token: ${{ secrets.REPO_TOKEN }} - name: Set up JDK 21 uses: actions/setup-java@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f594767 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Publish package to GitHub Packages +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}