mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 06:28:54 +00:00
Adjust actions workflow
This commit is contained in:
1 file changed
+6
-6
@@ -5,12 +5,12 @@ on:
|
|||||||
tags: [ "v**" ]
|
tags: [ "v**" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
release:
|
release:
|
||||||
types: [ released ]
|
types: [ published ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# Only run on PRs if the source branch is on someone else's repo
|
# Only run on PRs if the source branch is on someone else's repo
|
||||||
if: ${{ (github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name) && (github.event.name != 'push' || !startsWith(github.ref, 'refs/tags/') || contains(github.ref, '+beta.')) }}
|
if: ${{ (github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name) && (github.event.name != 'push' || !startsWith(github.ref, 'refs/tags/') || contains(github.ref, '-beta.')) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -55,24 +55,24 @@ jobs:
|
|||||||
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}"
|
# ORG_GRADLE_PROJECT_parksUsername: "${{ secrets.CI_USER }}"
|
||||||
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}"
|
# ORG_GRADLE_PROJECT_parksPassword: "${{ secrets.CI_PASS }}"
|
||||||
- name: Parse tag
|
- name: Parse tag
|
||||||
if: "${{ github.event_name == 'push' && contains(github.ref, '+beta.') }}"
|
if: "${{ github.event_name == 'push' && contains(github.ref, '-beta.') }}"
|
||||||
id: vars
|
id: vars
|
||||||
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
||||||
- name: Create Pre-Release and changelog
|
- name: Create Pre-Release and changelog
|
||||||
if: "${{ github.event_name == 'push' && contains(github.ref, '+beta.') }}"
|
if: "${{ github.event_name == 'push' && contains(github.ref, '-beta.') }}"
|
||||||
uses: MC-Machinations/[email protected]
|
uses: MC-Machinations/[email protected]
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
title: CarbonChat ${{ steps.vars.outputs.tag }}
|
title: CarbonChat ${{ steps.vars.outputs.tag }}
|
||||||
pre-release: true
|
pre-release: true
|
||||||
- name: Publish (Pre-)Release to Modrinth
|
- name: Publish (Pre-)Release to Modrinth
|
||||||
if: "${{ env.STATUS == 'release' && (github.event_name == 'release' || (github.event_name == 'push' && contains(github.ref, '+beta.'))) }}"
|
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
|
||||||
run: ./gradlew :carbonchat-paper:modrinth :carbonchat-velocity:modrinth
|
run: ./gradlew :carbonchat-paper:modrinth :carbonchat-velocity:modrinth
|
||||||
env:
|
env:
|
||||||
MODRINTH_TOKEN: "${{ secrets.MODRINTH_TOKEN }}"
|
MODRINTH_TOKEN: "${{ secrets.MODRINTH_TOKEN }}"
|
||||||
RELEASE_NOTES: "${{ github.event.release.body }}"
|
RELEASE_NOTES: "${{ github.event.release.body }}"
|
||||||
- name: Publish (Pre-)Release to Hangar
|
- name: Publish (Pre-)Release to Hangar
|
||||||
if: "${{ env.STATUS == 'release' && (github.event_name == 'release' || (github.event_name == 'push' && contains(github.ref, '+beta.'))) }}"
|
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
|
||||||
run: ./gradlew publishAllPublicationsToHangar
|
run: ./gradlew publishAllPublicationsToHangar
|
||||||
env:
|
env:
|
||||||
HANGAR_UPLOAD_KEY: "${{ secrets.HANGAR_UPLOAD_KEY }}"
|
HANGAR_UPLOAD_KEY: "${{ secrets.HANGAR_UPLOAD_KEY }}"
|
||||||
|
|||||||
Reference in new issue
Block a user