Skip to content

Commit

Permalink
Added publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariensg committed Apr 4, 2022
1 parent aded7a3 commit df84a91
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-20.04
steps:

- name: Checkout Repository
uses: actions/checkout@v2

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Build
run: ./gradlew build

- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: build/libs/

- name: Publish to Modrinth
run: ./gradlew publishModrinth
env:
MODRINTH: ${{ secrets.MODRINTH_TOKEN }}

- name: Publish to Curseforge
run: ./gradlew curseforge
env:
CURSEFORGE: ${{ secrets.CURSEFORGE_TOKEN }}

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "./build/libs/*"
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ steps.get_version.outputs.VERSION }} for Minecraft 1.18.x

- name: Publish to Infernal Studios Maven
run: ./gradlew publish
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}

0 comments on commit df84a91

Please sign in to comment.