forked from orffen/basicfantasyrpg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
orffen#76 release automation
- Loading branch information
Showing
3 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- 'core feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
labels: | ||
- 'refactoring' | ||
- 'maintenance' | ||
- title: '📖 Documentation' | ||
labels: | ||
- 'documentation' | ||
template: | | ||
## What's Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release Creation | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Substitute the Manifest and Download URLs in the system.json | ||
- name: Substitute Manifest and Download Links For Versioned Ones | ||
id: sub_manifest_link_version | ||
uses: microsoft/variable-substitution@v1 | ||
with: | ||
files: 'system.json' | ||
env: | ||
version: ${{github.event.release.tag_name}} | ||
url: https://github.com/${{github.repository}} | ||
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json | ||
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}.zip | ||
|
||
# Create a zip file with all files required by the module to add to the release | ||
- run: zip -r ./${{github.event.release.tag_name}}.zip system.json template.json LICENSE lang/ module/ styles/ templates/ | ||
|
||
# Create a release for this specific version | ||
- name: Update Release with Files | ||
id: create_version_release | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ github.event.release.name }} | ||
allowUpdates: true # Set this to false if you want to prevent updating existing releases | ||
draft: true | ||
prerelease: false | ||
artifacts: './system.json, ./${{ github.event.release.tag_name }}.zip' | ||
tag: ${{ github.event.release.tag_name }} | ||
body: ${{ github.event.release.body }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
# workflow_dispatch allows manual runs so the release notes can be rebuilt after PRs are renamed or relabeled | ||
workflow_dispatch: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- main | ||
# pull_request event is required only for autolabeler | ||
pull_request: | ||
# Only following types are handled by the action, but one can default to all as well | ||
types: [opened, reopened, synchronize] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
# write permission is required to create a github release | ||
contents: write | ||
# write permission is required for autolabeler | ||
# otherwise, read permission is required at least | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into main | ||
- uses: release-drafter/release-drafter@v6 | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
# with: | ||
# config-name: my-config.yml | ||
# disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |