combined all actions files into a single file
This commit is contained in:
parent
2ef4df04be
commit
0a9718c845
2 changed files with 58 additions and 33 deletions
|
@ -1,12 +1,11 @@
|
|||
name: Build
|
||||
name: Actions
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Documentation:
|
||||
Build Documentation:
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/galacticfactory/documentation:latest
|
||||
steps:
|
||||
|
@ -50,7 +49,7 @@ jobs:
|
|||
env:
|
||||
GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }}
|
||||
|
||||
Export Files:
|
||||
Build and Upload Export Files:
|
||||
runs-on: docker
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
|
@ -80,3 +79,58 @@ jobs:
|
|||
with:
|
||||
name: PrismLauncher
|
||||
path: /export/prism/
|
||||
|
||||
Autotagger:
|
||||
runs-on: docker
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "GalacticFactory"
|
||||
git config --global user.email "contact@galacticfactory.cc"
|
||||
|
||||
- name: Import GPG key
|
||||
uses: actions/gpg@v4
|
||||
with:
|
||||
gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase : ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Extract commit message
|
||||
id: extract_commit_message
|
||||
run: echo "::set-output name=message::$(git log --format=%B -n 1 $GITHUB_SHA)"
|
||||
|
||||
- name: Check commit message
|
||||
id: check_commit_message
|
||||
run: |
|
||||
COMMIT_MESSAGE=$(echo "${{ steps.extract_commit_message.outputs.message }}")
|
||||
OUTPUT=$(python .gitea/workflows/scripts/message.py "$COMMIT_MESSAGE")
|
||||
if [ "$OUTPUT" = "Usage: python message.py <commit_message>" ]; then
|
||||
echo "Called without commit message!"
|
||||
exit 1
|
||||
elif [ "$OUTPUT" = "None" ]; then
|
||||
echo "No version bump."
|
||||
echo "::set-output name=latest_tag::$(git describe --tags --abbrev=0)"
|
||||
else
|
||||
echo "Version bump detected: $OUTPUT"
|
||||
echo "::set-output name=version::$OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create tag
|
||||
if: steps.check_commit_message.outputs.version
|
||||
run: |
|
||||
VERSION=${{ steps.check_commit_message.outputs.version }}
|
||||
git tag -s $VERSION -m "version bumped to $VERSION"
|
||||
git push origin $VERSION
|
||||
|
||||
- name: Update latest tag
|
||||
if: steps.check_commit_message.outputs.latest_tag
|
||||
run: |
|
||||
COMMIT_MESSAGE=$(echo "${{ steps.extract_commit_message.outputs.message }}")
|
||||
LATEST_TAG=${{ steps.check_commit_message.outputs.latest_tag }}
|
||||
git tag -fs $LATEST_TAG -m "$COMMIT_MESSAGE"
|
||||
git push origin $LATEST_TAG --force
|
|
@ -1,29 +0,0 @@
|
|||
name: Test
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Prism Launcher:
|
||||
runs-on: docker
|
||||
container: www.coastalcommits.com/galacticfactory/documentation:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Copy export files
|
||||
run: |
|
||||
mkdir -vp /test/.minecraft
|
||||
cp -vrT ./build/prism /test/
|
||||
cp -v ./unsup.ini /test/.minecraft/
|
||||
|
||||
- name: ZIP export files
|
||||
run: |
|
||||
cd /test
|
||||
zip -r GalacticFactory.zip ./
|
||||
|
||||
- name: Check Prism Launcher version
|
||||
run: prismlauncher --version --alive
|
||||
|
||||
- name: Import instance
|
||||
run: prismlauncher --import /test/GalacticFactory.zip
|
Reference in a new issue