Skip to content

Commit 00a7930

Browse files
committed
Add release job to CI workflow
1 parent d1b6e4c commit 00a7930

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build & Release
22

33
on: [push, pull_request, workflow_dispatch]
44

@@ -44,3 +44,28 @@ jobs:
4444
name: invistags-mc${{ matrix.version.name }}
4545
path: build/libs/*.jar
4646
if-no-files-found: error
47+
48+
release:
49+
if: github.event_name == 'push'
50+
needs: build
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/download-artifact@v4
54+
with:
55+
path: artifacts
56+
57+
- name: Generate release tag
58+
id: tag
59+
run: echo "tag=release-$(date +'%Y%m%d-%H%M%S')" >> "$GITHUB_OUTPUT"
60+
61+
- uses: softprops/action-gh-release@v2
62+
with:
63+
tag_name: ${{ steps.tag.outputs.tag }}
64+
name: Build ${{ steps.tag.outputs.tag }}
65+
body: |
66+
Automated build for MC versions:
67+
- 1.20.4
68+
- 1.21.11
69+
- 26.1.2
70+
- 26.2
71+
files: artifacts/**/*.jar

0 commit comments

Comments
 (0)