Skip to content

Commit 82f22cd

Browse files
committed
update release.yaml for testing
1 parent 3dd206c commit 82f22cd

File tree

1 file changed

+15
-42
lines changed

1 file changed

+15
-42
lines changed

.github/workflows/release.yaml

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,47 @@
11
name: Release
2-
32
on:
43
push:
54
tags:
65
- "v*"
7-
86
jobs:
97
release:
108
name: Release
11-
runs-on: ubuntu-24.04
9+
runs-on: ubuntu-latest
1210
permissions:
13-
contents: write # write is required to create releases and push.
11+
contents: write
1412
steps:
15-
- name: Code checkout
16-
uses: actions/checkout@v4
17-
18-
- name: Setup Node
19-
uses: actions/setup-node@v4
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
2015
with:
2116
node-version: 22
2217
cache: yarn
23-
24-
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
26-
18+
- run: yarn install --frozen-lockfile
2719
- run: yarn tsc
28-
- run: yarn lint
29-
- name: Build
30-
run: yarn build:production
31-
32-
- name: Create release branch and bump version
33-
env:
34-
REF: ${{ github.ref }}
20+
- run: yarn build:production
21+
- name: create release branch and bump version
3522
run: |
36-
BRANCH=release/"${REF:10}"
23+
BRANCH=release/${{ github.ref_name }}
3724
git config --local user.email 'ci@pterodactyl.io'
3825
git config --local user.name 'Pterodactyl CI'
3926
git checkout -b "$BRANCH"
4027
git push -u origin "$BRANCH"
41-
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
28+
sed -i "s/'canary'/'${{ github.ref_name }}'/" config/app.php
4229
git add config/app.php
4330
git commit -m 'ci(release): bump version'
4431
git push
45-
46-
- name: Create release archive
32+
- name: create release archive
4733
run: |
48-
rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix
34+
rm -rf node_modules tests CONTRIBUTING.md flake.lock flake.nix phpunit.xml shell.nix
4935
tar -czf panel.tar.gz * .editorconfig .env.example .eslintignore .eslintrc.js .gitignore .prettierrc.json
50-
51-
- name: Extract changelog
52-
env:
53-
REF: ${{ github.ref }}
54-
run: |
55-
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
56-
57-
- name: Create checksum and add to changelog
36+
- name: write changelog
5837
run: |
59-
SUM=`sha256sum panel.tar.gz`
60-
echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG
61-
echo "$SUM" > checksum.txt
62-
63-
- name: Create release
64-
id: create_release
65-
uses: softprops/action-gh-release@v2
38+
sed -n "/^## ${{ github.ref_name }}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
39+
- uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
6640
env:
6741
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6842
with:
6943
draft: true
70-
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
44+
prerelease: ${{ contains(github.ref_name, 'rc') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') }}
7145
body_path: ./RELEASE_CHANGELOG
7246
files: |
7347
panel.tar.gz
74-
checksum.txt

0 commit comments

Comments
 (0)