-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (33 loc) · 877 Bytes
/
Copy pathrelease.yml
File metadata and controls
40 lines (33 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
cache: maven
- name: Build
run: mvn -B clean package
- name: Read version
id: tag
run: echo "tag=v$(cat src/main/resources/version.txt | tr -d '[:space:]')" >> "$GITHUB_OUTPUT"
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.tag.outputs.tag }}
run: |
gh release create "$TAG" \
--target "$GITHUB_SHA" \
--title "$TAG" \
--generate-notes \
target/zb.jar src/main/sh/zb.sh