mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-03 03:57:50 +00:00
- add publish to modrinth script - add publish to curseforge script - update build and release ci - fix spelling in README.md Signed-off-by: Lucas Petrino <nsx1lucas@gmail.com>
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
- name: Make gradlew executable
|
|
run: chmod +x ./gradlew
|
|
- name: Build with Gradle
|
|
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25
|
|
with:
|
|
arguments: build
|
|
- name: Upload Build Results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build
|
|
path: |
|
|
fabric/build/**/*.jar
|
|
forge/build/**/*.jar
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
needs: [build]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/download-artifact@v3
|
|
- name: Create Release
|
|
run: |
|
|
mkdir dist
|
|
mv build/**/*.jar dist
|
|
|
|
pushd dist
|
|
shasum -a 256 * > checksums.txt
|
|
popd
|
|
|
|
version=$(grep mod_version gradle.properties | cut -d'=' -f2 | awk '{gsub(/^ +| + $/,""); print}')
|
|
channel=$(grep release_channel gradle.properties | cut -d'=' -f2 | awk '{gsub(/^ +| + $/,""); print}')
|
|
|
|
release_args=(
|
|
"$version"
|
|
--title "Weather Changer ${version}"
|
|
--generate-notes
|
|
)
|
|
|
|
gh release create "${release_args[@]}" ./dist/* |