mirror of
https://github.com/dedicatedcode/reitti.git
synced 2026-01-08 00:53:53 -05:00
80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
---
|
|
name: "release"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
jobs:
|
|
tagged-release:
|
|
name: "Release"
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 25
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '25'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
- name: Install dependencies for acknowledgments script
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y jq curl
|
|
- name: Generate acknowledgments data
|
|
run: |
|
|
chmod +x scripts/generate-acknowledgments.sh
|
|
./scripts/generate-acknowledgments.sh
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build
|
|
run: mvn verify -DskipTests
|
|
- name: Create bundle
|
|
run: mkdir staging && cp target/*.jar staging
|
|
- name: Upload packages
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Package
|
|
path: staging
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
dedicatedcode/reitti
|
|
tags: |
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
make_latest: true
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
staging/*.jar
|
|
LICENSE
|
|
- name: Update dependency graph
|
|
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|