From 0bdbab98a8308f3f83435af19f566c3b84d6bf72 Mon Sep 17 00:00:00 2001 From: Chikage0o0 <89348590+Chikage0o0@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:38:25 +0800 Subject: [PATCH] PreRelease 3.4.0 --- .github/workflows/AutoBuildPack.yml | 32 +++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/AutoBuildPack.yml b/.github/workflows/AutoBuildPack.yml index af47232..53036c1 100644 --- a/.github/workflows/AutoBuildPack.yml +++ b/.github/workflows/AutoBuildPack.yml @@ -7,6 +7,11 @@ on: push: branches: [ main ] +env: + PROJECT_ID: Cc9a9YwB + RELEASE_TYPE: 22.03-SNAPSHOT + USE_TG: true + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -26,25 +31,48 @@ jobs: with: go-version: '1.19' - - name: get version - id: pack_version + - name: get info run: | echo "pack_version=$(git show -s --format=%B | head -1 | grep -o '[0-9\.]*$')" >> $GITHUB_ENV + echo "game_version=$(grep -oP '(?<=minecraft = \")[0-9.]+' ./pack.toml)" >> $GITHUB_ENV + echo "loader=$(grep -oP '(quilt|fabric|forge)' ./pack.toml)" >> $GITHUB_ENV # Runs a single command using the runners shell - name: build modpack run: bash build.sh + + - name: Create changelog text + id: changelog + uses: loopwerk/tag-changelog@v1 + with: + token: ${{ secrets.SECRET }} + exclude_types: other - name: release uses: ncipollo/release-action@v1 with: name: ${{ env.pack_version }} + body: ${{ steps.changelog.outputs.changes }} allowUpdates: true tag: ${{ env.pack_version }} commit: main replacesArtifacts: true token: ${{ secrets.SECRET }} artifacts: ./*.mrpack + + - name: Upload to Modrinth + uses: RubixDev/modrinth-upload@v1 + with: + token: ${{ secrets.MODRINTH }} + file_path: ./*.mrpack + name: ${{ env.pack_version }} + version: ${{ env.pack_version }} + changelog: ${{ steps.changelog.outputs.changes }} + game_versions: ${{ env.game_version }} + release_type: ${{ env.RELEASE_TYPE }} + loaders: ${{ env.loader }} + featured: false + project_id: ${{ env.PROJECT_ID }} preRelease: runs-on: ubuntu-latest