TechReborn/.github/workflows/release.yml
2023-08-09 13:13:31 +01:00

45 lines
No EOL
1.3 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
channel:
description: 'Release channel'
required: true
default: 'release'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:19-jdk
options: --user root
steps:
- run: apt update && apt install git -y
- run: git config --global --add safe.directory /__w/TechReborn/TechReborn
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: FabricMC/fabric-action-scripts@v2
id: changelog
with:
context: changelog
workflow_id: release.yml
- run: ./gradlew build publish publishMods --stacktrace -x test
env:
RELEASE_CHANNEL: ${{ github.event.inputs.channel }}
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/