mirror of
https://github.com/rife2/bld
synced 2026-06-28 22:57:47 +02:00
Some checks are pending
bld-ci / build-linux (17) (push) Waiting to run
bld-ci / build-linux (22) (push) Waiting to run
bld-ci / build-linux (24) (push) Waiting to run
bld-ci / build-linux (26) (push) Waiting to run
bld-ci / build-macos (17) (push) Waiting to run
bld-ci / build-macos (20) (push) Waiting to run
bld-ci / build-macos (21) (push) Waiting to run
bld-ci / build-macos (22) (push) Waiting to run
bld-ci / build-macos (23) (push) Waiting to run
bld-ci / build-macos (24) (push) Waiting to run
bld-ci / build-macos (25) (push) Waiting to run
bld-ci / build-windows (17) (push) Waiting to run
bld-ci / build-windows (20) (push) Waiting to run
bld-ci / build-windows (21) (push) Waiting to run
bld-ci / build-windows (22) (push) Waiting to run
bld-ci / build-windows (23) (push) Waiting to run
bld-ci / build-windows (24) (push) Waiting to run
bld-ci / build-windows (25) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
* Run JUnit reporter without internet (offline) * Add repository locations to publish workflow * Change java-version matrix to LTS and current JDK versions
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
name: publish-snapshots
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-bld-project:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout source repository
|
|
uses: actions/checkout@v7
|
|
with:
|
|
clean: true
|
|
submodules: 'true'
|
|
fetch-depth: 0
|
|
|
|
- name: Check version is SNAPSHOT
|
|
shell: bash
|
|
run: |
|
|
VERSION=$(tr -d '[:space:]' < src/main/resources/BLD_VERSION)
|
|
echo "Current version: $VERSION"
|
|
if ! echo "$VERSION" | grep -q 'SNAPSHOT$'; then
|
|
echo "::error:: Version '$VERSION' is not a SNAPSHOT. Aborting publish."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 17
|
|
|
|
- name: Download dependencies
|
|
run: ./bld download
|
|
|
|
- name: Import key
|
|
run: echo "${{ secrets.SIGN_SECRET_KEY }}" | gpg --batch --import
|
|
|
|
- name: Compile source
|
|
run: ./bld clean compile
|
|
|
|
- name: Run tests
|
|
id: tests
|
|
run: ./bld test
|
|
|
|
- name: Run reporter
|
|
if: always() && steps.tests.outcome == 'failure'
|
|
run: ./bld --offline reporter --all
|
|
|
|
- name: Publish
|
|
run: >-
|
|
./bld publish
|
|
-Dbld.repo.github=https://maven.pkg.github.com/rife2/bld
|
|
-Dbld.repo.github.username=${{ secrets.GH_USERNAME }}
|
|
-Dbld.repo.github.password=${{ secrets.GH_PASSWORD }}
|
|
-Dbld.repo.rife2-snapshots=https://repo.rife2.com/snapshots/
|
|
-Dbld.repo.rife2-snapshots.username=${{ secrets.RIFE2_USERNAME }}
|
|
-Dbld.repo.rife2-snapshots.password=${{ secrets.RIFE2_PASSWORD }}
|
|
-Dbld.repo.central-snapshots=https://central.sonatype.com/repository/maven-snapshots/
|
|
-Dbld.repo.central-snapshots.username=${{ secrets.SONATYPE_USER }}
|
|
-Dbld.repo.central-snapshots.password=${{ secrets.SONATYPE_PASSWORD }}
|
|
-Dsign.key=${{ secrets.SIGN_KEY }}
|
|
-Dsign.passphrase=${{ secrets.SIGN_PASSPHRASE }}
|
|
|
|
- name: Delete GnuPG data
|
|
if: always()
|
|
run: rm -rfv $HOME/.gnupg |