Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
update github-actions
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <[email protected]>
  • Loading branch information
sebhoss committed Nov 12, 2023
1 parent aa39694 commit f5a83ce
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 102 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: The maven-build-process Authors
# SPDX-License-Identifier: 0BSD

name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 24 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,30 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- id: checkout
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/managed-pom
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Create release version
id: release
- id: last_release
name: Fetch last release info
run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: commits
name: Count Commits
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT
- id: release
name: Create release version
if: steps.commits.outputs.count > 0
run: echo "version=$(date +'%Y.%-m.%-d')" >> $GITHUB_OUTPUT
- name: Count commits in last week
id: commits
run: echo "count=$(git rev-list --count HEAD --since='last Friday')" >> $GITHUB_OUTPUT
- name: Set release version
if: steps.commits.outputs.count > 0
run: mvn --batch-mode --define newVersion=${{ steps.release.outputs.version }} --define generateBackupPoms=false versions:set
Expand All @@ -35,13 +45,13 @@ jobs:
run: echo "${{ secrets.GPG_SECRET_KEY_BASE64 }}" | base64 --decode > $GITHUB_WORKSPACE/signing.key.asc
- name: Publish to Maven Central
if: steps.commits.outputs.count > 0
run: |
mvn \
--batch-mode \
--activate-profiles release \
--define pgp.secretkey=keyfile:$GITHUB_WORKSPACE/signing.key.asc \
--define pgp.passphrase=literal:${{ secrets.GPG_SECRET_KEY_PASSWORD }} \
deploy
run: >
mvn
--batch-mode
--activate-profiles release
--define pgp.secretkey=keyfile:$GITHUB_WORKSPACE/signing.key.asc
--define pgp.passphrase=literal:${{ secrets.GPG_SECRET_KEY_PASSWORD }}
deploy
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
Expand All @@ -58,7 +68,7 @@ jobs:
- id: mail
name: Send Mail
if: steps.commits.outputs.count > 0
uses: dawidd6/action-send-mail@v3.7.1
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.MAIL_SERVER }}
server_port: ${{ secrets.MAIL_PORT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/managed-java
- uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone Git Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: ./.github/actions/managed-java
- name: Cache Dependencies
uses: actions/cache@v3
Expand Down
39 changes: 0 additions & 39 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 0 additions & 46 deletions .idea/modules.xml

This file was deleted.

0 comments on commit f5a83ce

Please sign in to comment.