Skip to content

Commit 153cfd6

Browse files
Add sourcemod plugin artifact to output packages.
1 parent 734486b commit 153cfd6

File tree

5 files changed

+22
-37
lines changed

5 files changed

+22
-37
lines changed

.env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#SENTRY_DSN=https://xxxxxxxxxxxxxxxxxxxxxxxxx
2+
STEAM_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

.github/workflows/release.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
repository: ${{ github.event.pull_request.head.repo.full_name }}
1616
ref: ${{ github.head_ref }}
1717
fetch-depth: 0
18+
1819
- uses: extractions/setup-just@v3
20+
1921
- uses: actions/setup-go@v5
2022
with:
2123
go-version: "stable"
@@ -32,30 +34,11 @@ jobs:
3234
cache: "pnpm"
3335
cache-dependency-path: "frontend/pnpm-lock.yaml"
3436

35-
- name: Install modules
36-
working-directory: ./frontend
37-
run: pnpm install --frozen-lockfile --strict-peer-dependencies
38-
39-
- name: Build frontend
40-
working-directory: ./frontend
41-
run: pnpm build
42-
env:
43-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
44-
SENTRY_URL: ${{ env.SENTRY_URL }}
45-
SENTRY_ORG: ${{ env.SENTRY_ORG }}
46-
SENTRY_PROJECT: ${{ env.SENTRY_PROJECT }}
47-
VITE_BUILD_VERSION: ${{ inputs.version }}
48-
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
49-
5037
- name: Setup SourcePawn Compiler
5138
uses: rumblefrog/setup-sp@master
5239
with:
5340
version: "1.13.x"
5441

55-
- name: Build sourcemod plugin
56-
working-directory: ./sourcemod/scripting
57-
run: spcomp -i"./include/" gbans.sp -o ../plugins/gbans.smx
58-
5942
- name: Login to GitHub Container Registry
6043
uses: docker/login-action@v3
6144
with:
@@ -81,21 +64,17 @@ jobs:
8164
# DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
8265
# DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
8366
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
67+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
68+
SENTRY_URL: ${{ env.SENTRY_URL }}
69+
SENTRY_ORG: ${{ env.SENTRY_ORG }}
70+
SENTRY_PROJECT: ${{ env.SENTRY_PROJECT }}
71+
VITE_BUILD_VERSION: ${{ inputs.version }}
72+
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
8473

85-
- name: Upload snapshot
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: snapshot
89-
#pattern: snapshot-*
90-
#merge-multiple: true
91-
path: build/*
92-
retention-days: 1
93-
overwrite: true
94-
95-
- name: Update contributor list
96-
uses: akhilmhdh/contributors-readme-action@v2.3.11
97-
env:
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
# - name: Update contributor list
75+
# uses: akhilmhdh/contributors-readme-action@v2.3.11
76+
# env:
77+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9978

10079
# - name: Create Sentry release
10180
# uses: getsentry/action-release@v3

.goreleaser.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project_name: gbans
55
before:
66
hooks:
77
- just frontend
8+
- just sourcemod
89

910
dockers_v2:
1011
- dockerfile: "docker/Dockerfile"
@@ -57,6 +58,7 @@ archives:
5758
- README.md
5859
- gbans_example.yml
5960
- sourcemod/plugins/gbans.smx
61+
- sourcemod/adminmenu_custom.txt
6062
# this name template makes the OS and Arch compatible with the results of `uname`.
6163
name_template: >-
6264
{{ .ProjectName }}_{{- title .Os }}_{{- .Version }}-

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ air:
4747
while true; do air -c .air.toml -- serve; sleep 1; done
4848

4949
sourcemod:
50-
just -f sourcemod/justfile sourcemod
50+
just -f sourcemod/justfile
5151

5252
sourcemod_devel: sourcemod
5353
docker cp sourcemod/plugins/gbans.smx srcds-localhost-1:/home/tf2server/tf-dedicated/tf/addons/sourcemod/plugins/
@@ -82,8 +82,8 @@ typecheck_ts:
8282
just -f frontend/justfile typecheck
8383

8484
clean:
85-
go clean $(GO_FLAGS) -i
86-
rm -rf ./build/
85+
go clean -i
86+
rm -rf ./dist/
8787
just -f frontend/justfile clean
8888
rm -rf ./sourcemod/plugins/gbans.smx
8989

sourcemod/justfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
INCLUDE_DIR := shell('dirname $(which spcomp64)') + "/include"
2+
13
all: build
24

35
fmt:
46
find scripting/ -not -path "./include/*" -iname gbans.inc -o -iname *.sp -type f -exec sp_format {} \;
57

68
build:
7-
$(SM_HOME)/scripting/spcomp64 scripting/gbans.sp -o plugins/gbans.smx -i$(SM_HOME)/scripting/include -i scripting/include -v2
9+
spcomp64 scripting/gbans.sp -o plugins/gbans.smx -i{{ INCLUDE_DIR }} -i scripting/include -v2
810

911
copy:
1012
cp -rv scripting/* $(HOME)/projects/uncletopia/roles/sourcemod/files/addons/sourcemod/scripting/

0 commit comments

Comments
 (0)