Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GH action for releasing with BigWigsMods/packager #68

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Package and release

# we need to let GitHub know _when_ we want to release, typically only when we create a new tag.
# this will target only tags
on:
push:
tags:
- '**'

jobs:
release:
runs-on: ubuntu-latest

# specify the environment variables used by the packager, matching the secrets from the project on GitHub
env:
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow


# "steps" holds a list of all the steps needed to package and release our AddOn
steps:

# we first have to clone the AddOn project, this is a required step
- name: Clone project
uses: actions/checkout@v3

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a step here to remove the stuff from the repo that we don't want to get packaged up with the mod? Those files would be: .github/ and .luacheckrc - not that they are sensitive data, but they're not relevant to the player

Something like:

- name: delete non-release files
- run: rm -rf .github/ .luacheckrc

It looks like this would also be achievable by adding a .pkgmeta file to the repo per https://github.com/BigWigsMods/packager/wiki/Preparing-the-PackageMeta-File#changing-the-package-name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look here: https://github.com/MyGamesDevelopmentAcc/sArena/releases/tag/testrelease_1
Those files do not land in the release already.

For curse to work it would require just adding the curse key by @stako .

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look here: https://github.com/MyGamesDevelopmentAcc/sArena/releases/tag/testrelease_1 Those files do not land in the release already.

Nice. Don't hesitate to share that kind of context (link to test release) in the PR description :)

For curse to work it would require just adding the curse key by @stako .


# once cloned, we just run the GitHub Action for the packager project
- name: Package and release
uses: BigWigsMods/packager@v2