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

Implemented automation workflows for change notes and release building #78

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .github/release-drafter.yml
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
42 changes: 42 additions & 0 deletions .github/workflows/release-creation.yml
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}}/basicfantasyrpg.zip

# Create a zip file with all files required by the module to add to the release
- run: zip -r ./basicfantasyrpg.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: ${{ github.event.release.draft }}
prerelease: ${{ github.event.release.prerelease }}
artifacts: './system.json, ./basicfantasyrpg.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
34 changes: 34 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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:
# Only following types are handled by the action, but one can default to all as well
types: [edited, labeled, unlabeled, 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 }}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Basic Fantasy RPG for FoundryVTT

![GitHub Release](https://img.shields.io/github/v/release/orffen/basicfantasyrpg?logo=GitHub&label=Release)
[![Static Badge](https://img.shields.io/badge/Foundry%20Version-v11+-orange?logo=foundry-virtual-tabletop)](https://foundryvtt.com/)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/orffen/basicfantasyrpg?logo=GitHub&label=Issues)
![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/orffen/basicfantasyrpg/bug?logo=GitHub&label=Open%20Bugs&color=red)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/orffen/basicfantasyrpg/total?logo=GitHub&label=Total%20Downloads)
![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/orffen/basicfantasyrpg/latest/total?logo=GitHub&label=Downloads%3A%20Latest)

This is the [Basic Fantasy RPG](https://www.basicfantasy.org/) system for FoundryVTT. Please also see the [companion compendium module](https://github.com/Stew-rt/basicfantasyrpg-corerules-en), which contains items, spells, monsters etc. for easy use with the system.

## Installation

This system is available within FoundryVTT, or you can manually install it by using the manifest link below:

https://raw.githubusercontent.com/orffen/basicfantasyrpg/main/system.json
```html
https://github.com/orffen/basicfantasyrpg/releases/latest/download/system.json
```

## Usage

Expand Down
6 changes: 3 additions & 3 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "basicfantasyrpg",
"title": "Basic Fantasy RPG",
"description": "The Basic Fantasy RPG system for FoundryVTT!",
"version": "r14",
"version": "dev",
"compatibility": {
"minimum": "11",
"verified": "12"
Expand Down Expand Up @@ -44,7 +44,7 @@
"primaryTokenAttribute": "hitPoints",
"secondaryTokenAttribute": null,
"url": "https://github.com/orffen/basicfantasyrpg",
"manifest": "https://raw.githubusercontent.com/orffen/basicfantasyrpg/main/system.json",
"download": "https://github.com/orffen/basicfantasyrpg/archive/refs/tags/r14.zip",
"manifest": "Will be populated by release creation workflow",
"download": "Will be populated by release creation workflow",
"license": "LICENSE.txt"
}