Skip to content

Update publishing for 1.21.1 #32

Update publishing for 1.21.1

Update publishing for 1.21.1 #32

Workflow file for this run

name: Build
on:
push:
tags: ['v*']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
- name: Get the version
id: get_version
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
return '${{ github.ref }}'.replace('refs/tags/v', '');
- name: Build
run: ./gradlew build
env:
VERSION: ${{ steps.get_version.outputs.result }}
OFFICIAL_MAPPINGS: true
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.result }}
release_name: Primal Winter 1.21.1-${{ steps.get_version.outputs.result }}
body: |
[This was an automatic build]
// todo: add changelog
draft: true
prerelease: false
- name: Upload NeoForge Jar
id: upload_neoforge_jar
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./NeoForge/build/libs/primalwinter-neoforge-1.21.1-${{ steps.get_version.outputs.result }}.jar
asset_name: primalwinter-neoforge-1.21.1-${{ steps.get_version.outputs.result }}.jar
asset_content_type: application/java-archive
- name: Upload Fabric Jar
id: upload_fabric_jar
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Fabric/build/libs/primalwinter-fabric-1.21.1-${{ steps.get_version.outputs.result }}.jar
asset_name: primalwinter-fabric-1.21.1-${{ steps.get_version.outputs.result }}.jar
asset_content_type: application/java-archive