Commit graph

89 commits

Author SHA1 Message Date
Luke
756f3138dd Update workflows actions to @v4 and net9 2025-01-11 14:43:05 +10:00
Luke
91c578815c Update net6 refs to net9 2025-01-11 11:19:16 +10:00
Lucas Nicodemus
3da4bf4b45
Remove inactive people from sponsors 2025-01-03 00:05:25 +09:00
Tim Schumacher
3ffe8e1274 Add CI for Docker images 2023-10-21 23:04:21 +02:00
Lucas Nicodemus
69569a5be5
Added obvious warning about spamming github to code of conduct 2023-03-10 10:37:15 +09:00
Luke
45a378b0f0 Add TShock.Installer to download dotnet runtime
This will include a new ./TShock.Installer executable that will be for users without the dotnet runtime. This program will download the dotnet runtime, extract it, and then run ./TShock.Server for them using the downloaded runtime.

Note: only tested on osx, likely a no-go for linux/windows until more testing occurs.
2022-11-17 00:27:14 +10:00
Lucas Nicodemus
58fa827e39
Update i18n workflow files
Now, this requires some explanation.

Initially, we had the extract workflow, which did work. The problem is
that it can't commit to general-devel due to branch protection. If we
added a bypass that let it, though, it would enable anyone with write
access to this repository to write to general-devel (you can privilege
escalate easily).

Since we don't want that, this machine is setup:

1. TShock now triggers a workflow execution on a separate repo,
   hakusaro/tshock_i18n.
2. On hakusaro/tshock_i18n, a modified extraction script exists.
3. The modified extraction script, targeting tshock, downloads and runs
   itself.
4. @cardinal-system, a github user I control, creates and signs a commit
   and pushes it back to tshock, bypassing branch protection (because is
allowed to).

Now, nobody except me can modify the code that controls the system that
enables @cardinal-system to commit to tshock, preserving that security
element.

But how is the workflow in hakusaro/tshock_i18n triggered? Through
another workflow of course.

The issue is that triggering requires using...a PAT. Who's PAT? My PAT.
Github just launched fine-grained PATs, so I created a fine-grained PAT
scoped to only the hakusaro/tshock_i18n repo, and only workflow
dispatches.

There are other methods that could be used to technically perform this
triggering using a classic PAT, but they require the `repo` scope, which
would give anyone with write-access the ability to write to
hakusaro/tshock_i18n, which is clearly not-desired.

I was originally kinda stuck, thinking I'd have to make a fine-grained
PAT on @cardinal-system but that isn't supported yet (you can't scope a
fine-grained PAT to another user's repo yet -- only all of your repos or
the org's repos, not a collaborator's repo). But the new fine-grained
PAT system enables creating a PAT that just has a small, isolated set of
things tied to one user.

This is the safest option, I think.

The only catch is that the trigger PAT will expire on October 20, 2023,
so it has to be rotated yearly, like the nuget token
(https://github.com/Pryaxis/TShock/issues/2669).

Fun stuff.
2022-10-20 23:38:26 -07:00
Lucas Nicodemus
fe71e9ce9f
Add remote trigger pat action 2022-10-20 23:21:27 -07:00
Lucas Nicodemus
28838454f5
Attempt to fix i18n script 2022-10-20 02:17:56 -07:00
Janet Blackquill
77be338e46 Add i18n system 2022-10-20 02:09:29 -04:00
Joseph Goh
bf90131558
zip artifacts only for windows builds 2022-10-09 11:59:46 +08:00
renovate[bot]
d12a6a61c0
Update actions/upload-artifact action to v3 2022-10-06 17:56:57 +00:00
renovate[bot]
3d1f7e6e1f
Update actions/setup-dotnet action to v3 2022-10-06 16:36:37 +00:00
renovate[bot]
c853d68be0
Update actions/checkout action to v3 2022-10-06 16:07:49 +00:00
Lucas Nicodemus
4a426b476a
Remove changelog checker job 2022-10-06 01:34:47 -07:00
Lucas Nicodemus
e898cedee7
Change changelog checker to permit simple skips
Skip things labeled simple
2022-10-06 01:29:07 -07:00
Luke
aeac3c9c30 Add pull_request event to CI 2022-10-05 20:16:14 +10:00
Luke
f97cafaeb3 Add submodule checkout for Nuget workflow 2022-10-05 19:27:12 +10:00
Luke
1f949bd608 Add newline to OTAPI3 Nuget workflow 2022-10-05 19:02:01 +10:00
Luke
5fe857ef36 Create ci-otapi3-nuget.yml 2022-10-05 18:58:45 +10:00
Luke
966101baaf Move ci-otapi3-legacy.yml back to ci-otapi3.yml
Hopefully this cleans up actions tab some.
2022-10-05 18:58:36 +10:00
Luke
12a9676564 Remove "Legacy" from workflow file 2022-10-05 18:40:07 +10:00
Luke
e002c65f02 Replace otapi3 workflows with legacy variants
No need for otapi3 branch workflows here
2022-09-29 21:45:34 +10:00
Luke
f87fa90e65 Nuget package information and workflow 2022-09-10 09:07:13 +10:00
Luke
fc83d4af6c Update CI to clean directory structures
e.g. instead of the tar containing TShockLauncher/bin/Release/ etc, files should be in the root
2022-07-29 16:55:33 +10:00
Luke
578df18901 Redo launcher csproj and action to use framework dependent builds
This also includes package updates across the entire solution, which shouldn't matter at this stage on this branch.
2022-07-27 21:53:09 +10:00
Chris
f0f67a44e2
Merge pull request #2536 from Pryaxis/h/remove-dev-monomod
Remove monomod dev build shims
2022-02-23 20:52:25 +10:30
Lucas Nicodemus
78169c87cb Merge remote-tracking branch 'origin/general-devel' into otapi3 2022-02-16 18:44:33 -08:00
Lucas Nicodemus
5820c5344e
Add SignatureBeef (nee DeathCradle) to funding.yml 2022-02-16 18:15:23 -08:00
Lucas Nicodemus
fe25f8b3b2 Remove monomod dev build shims
This removes shims in-place to fetch monomod from outside of nuget,
since monomod has pushed the applicable versions to their primary nuget
repositories, and because the dev builds add unnecessary complexity to
the CI pipeline if kept in place.
2021-12-09 20:06:31 -08:00
Luke
f9ab45b571 CI - tar release to preserve permissions
Hopefully...
2021-12-03 10:38:30 +10:00
Luke
dbad25894e Remove build.yml + try and implement chmod in otapi3 ci 2021-12-03 08:06:07 +10:00
Luke
2c44f71043 CI upload artifacts + set tshock version to beta 2021-12-03 07:47:45 +10:00
Luke
f54c4eb0a1 Publish launcher only 2021-12-03 07:35:43 +10:00
Luke
ab676d5bc9
Correct ci matrix
Nothing to see here...
2021-12-03 00:28:14 +10:00
Luke
a9f0aa1219
Add recursive checkout option to ci 2021-12-03 00:20:51 +10:00
Luke
2c36dacfd2 Single file publish support, test project and simple build CI
This also adds remote raspberry pi debugging with default install details. More testing is required as MonoMod may not be working for arm64 still

CI might not work yet either
2021-12-03 00:07:11 +10:00
Lucas Nicodemus
58bc876eab Remove quake from funding file
Apparently there's a hard limit on 4 people. So what we'll do is just
swap people in and out as they contribute I guess?
2021-11-24 20:42:07 -08:00
Lucas Nicodemus
6e58173f8b Add DeathCradle to funding file
Yo why are you not funding DeathCradle?
2021-11-24 20:39:02 -08:00
Lucas Nicodemus
c71bcc02b9
Update PR template changelog warning 2021-07-24 16:19:59 -07:00
Lucas Nicodemus
d60a25b211 Use GitHub token built into GHA
Okay, now we're at problem 74 with github actions. Basically, github
actions doesn't send secrets to forks because duh, that makes sense. So
even if you make a super restricted token you still can't send it to
forks because github still doesn't understand how to make a security
platform when they just copy paste azure pipelines into github and then
say "well looks good to me" and ship fucking arbitrary code execution to
the entire fucking world and then try to retroactively fix all of their
mistakes and fail miserably in the process
2021-05-23 13:14:21 -07:00
Lucas Nicodemus
8611742286 Switch to entirely new action for changelog check
Look, let's just be real here: GitHub needs to redo the entire
permission model for GitHub. There is no way to create a secure
combination of the following elements: post comment, edit comment, and
post status check.

If you want to be able to post comments, you have to authorize a token
or app to have full authority to do literally anything that the user can
do on a public repo. Full stop.

If you want to post a status check, you have to give the user write
access to the entire repo, which makes the first issue a problem.

You can't just explicitly make a token that says "only allow this user
to post and edit its own comments" and "allow this user to post status
checks" because write access on the repo implies authority over all
other issues/PRs opened by other people.

Now Cardinal's token is restricted to just status checks, and we're
using a different action.

Thanks a ton for the huge mess Github.
2021-05-23 13:06:06 -07:00
Lucas Nicodemus
613afc1d75 Use Cardinal for danger CI
This change uses Cardinal's PAT for GitHub Actions CI. The way this
works is very convoluted, but it makes sense in theory.

1. Cardinal is a member of the Pryaxis org, in a group called "untrusted
   robots." She has write access to Pryaxis/TShock, so she can create
status messages. This is because GitHub only allows status messages to
be created if a user has write access.

2. Cardinal has a PAT, and that PAT only has access to creating
   repository status messages.

3. Danger requires permission to post comments and update CI status.

4. Cardinal's PAT is only authorized to create repo status messages, and
   cannot privilege escalate.

5. GitHub implicitly gives everyone the ability to post comments on
   public repositories.

Thus, this really interesting and weird flow should mean that Cardinal
can post comments and update status messages, by having write access but
functionally being unable to use it.

At least, that's the theory.
2021-05-23 12:23:08 -07:00
Lucas Nicodemus
7dde56e6da
Update danger to run on pull_request_target
pull_request_target runs in the context of the base repo, which should allow Danger to be able to comment on things from outside the repo: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
2021-05-22 21:56:36 -07:00
Lucas Nicodemus
b8b27277e9
Add recent collaborators to sponsors file 2021-05-22 11:16:41 -07:00
Lucas Nicodemus
d7bc4fdbda Add Danger CI check for changelog entries
This commit adds Danger via GitHub Actions. Dangerfiles are ruby files
that have a DSL for interacting with GitHub. They can do arbitrary
things. See: https://danger.systems/reference.html

The point of this commit is to automate the process of asking people to
update the changelog. This is a really really annoying thing that we
have to do too often. Editing a pull request will automatically re-run
the check.

Truly trivial commits can be marked as trivial easily by using the
hashtag trivial in the PR body. This is really just useful for actually
trivial things. Most commits actually do need to have associated
changelog entries.
2021-05-20 02:33:37 -07:00
Lucas Nicodemus
ab1e63beee
Add changelog warning to maka comment 2020-06-06 20:37:01 -07:00
Lucas Nicodemus
38d99de060
Merge branch 'general-devel' into general-devel 2020-05-30 16:11:22 -07:00
Stargazing Koishi
770d17c236
Update .github/workflows/build.yml
Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-05-30 16:07:12 -07:00
SGKoishi
a815b7556d
Upload artifacts with condition 2020-05-30 15:21:50 -07:00