Skip to content

Commit a7ed36f

Browse files
authored
Create release.yml
1 parent 6dc19d4 commit a7ed36f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch:
7+
permissions:
8+
packages: write
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
19+
with:
20+
java-version: 21
21+
distribution: 'adopt'
22+
- name: Build and Publish to Modrinth
23+
run: |
24+
./gradlew build
25+
- name: Create a Release
26+
uses: elgohr/Github-Release-Action@c5ea99036abb741a89f8bf1f2cd7fba845e3313a # v5
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
title: Build ${{ github.run_number }}
31+
tag: ${{ github.run_number }}
32+
workdir: ./build/libs/
33+

0 commit comments

Comments
 (0)