Skip to content

Commit

Permalink
cicd init
Browse files Browse the repository at this point in the history
  • Loading branch information
seabassjh committed Aug 27, 2022
1 parent 67f0d1d commit b08635b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
push:
tags:
- "v*.*.*"

env:
RELEASE_NAME: mana-mod
PUBLIC_URL: /mc-forge-mana-mod/

jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version-tag.outputs.VERSION }}
steps:
- name: Get tagged version
id: version-tag
run: echo "::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"

build-jar:
needs: setup
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
chmod +x gradlew
./gradlew build
- name: Rename
run: |
mc ./build/libs/mana-${{ needs.setup.outputs.version }.jar ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}.jar
- name: Upload
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: true
files: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}.jar
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ eclipse
run

# Files from Forge MDK
forge*changelog.txt
forge*changelog.txt
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
apply plugin: 'net.minecraftforge.gradle'


version = '0.0.1'
version = 'v0.0.1'
group = 'com.seabreyh.mana' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'mana'

Expand Down

0 comments on commit b08635b

Please sign in to comment.