mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-06 04:01:58 +02:00
ci: kill me now
This commit is contained in:
24
.github/workflows/release-action.yaml
vendored
24
.github/workflows/release-action.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Create release (reusable)
|
||||
name: Create release (automated)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -22,22 +22,21 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create release branch
|
||||
run: |
|
||||
git config user.name "github-actions[ci]"
|
||||
git config user.email "ci@pyrodactyl.dev"
|
||||
git checkout -b releases/v${{ inputs.version }}
|
||||
git checkout -B releases/v${{ inputs.version }}
|
||||
|
||||
- name: Update version in config/app.php
|
||||
run: |
|
||||
sed -i "s/'version' => '.*'/'version' => 'v${{ inputs.version }}'/g" config/app.php
|
||||
sed -i "s/'version' => '[^']*'/'version' => 'v${{ inputs.version }}'/" config/app.php
|
||||
|
||||
- name: Commit version bump
|
||||
run: |
|
||||
git add config/app.php
|
||||
git commit -m "ci: bump v${{ inputs.version }}"
|
||||
git commit -m "ci: bump v${{ inputs.version }}" || echo "No changes to commit"
|
||||
|
||||
- name: Push release branch
|
||||
run: git push origin releases/v${{ inputs.version }}
|
||||
@@ -45,10 +44,11 @@ jobs:
|
||||
# ---- Build tarball -------------------------------------------------
|
||||
- name: Create release archive
|
||||
run: |
|
||||
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md \
|
||||
flake.lock flake.nix phpunit.xml shell.nix
|
||||
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md
|
||||
|
||||
tar -czf panel.tar.gz \
|
||||
--exclude='.*' * .editorconfig .env.example .gitignore .prettierrc.json
|
||||
--exclude='.*' \
|
||||
* .env.example
|
||||
|
||||
- name: Generate checksum
|
||||
id: checksum
|
||||
@@ -58,6 +58,13 @@ jobs:
|
||||
echo "checksum=$(echo $SUM | cut -d' ' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
# ---- GitHub Release ------------------------------------------------
|
||||
- name: Validate release type
|
||||
run: |
|
||||
case "${{ inputs.release_type }}" in
|
||||
release|prerelease) ;;
|
||||
*) echo "Invalid release_type"; exit 1 ;;
|
||||
esac
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
@@ -72,3 +79,4 @@ jobs:
|
||||
checksum.txt
|
||||
body: |
|
||||
**SHA256 checksum:**
|
||||
`${{ steps.checksum.outputs.checksum }}`
|
||||
|
||||
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -11,7 +11,7 @@ on:
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- stable
|
||||
- release
|
||||
- prerelease
|
||||
default: stable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user