-
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.
- Loading branch information
0 parents
commit f2c1bb5
Showing
5 changed files
with
136 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,51 @@ | ||
name: Build and release | ||
|
||
on: | ||
push: | ||
branches: [master, main] | ||
|
||
env: | ||
OUTPUT_NAME: marker_pack_example # Change this to your desired file output name | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.event.head_commit.message, '[CI-BUILD]')" | ||
permissions: write-all | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Zip files | ||
uses: thedoctor0/zip-release@0.7.6 | ||
with: | ||
type: "zip" | ||
filename: "${{ env.OUTPUT_NAME }}.taco" | ||
exclusions: "*.git* /*.github/* install.bat" | ||
- name: Get version | ||
id: get_version | ||
run: echo "::set-output name=version::$(echo ${{ github.event.head_commit.message }} | awk '{print $2}')" | ||
- name: Get changelog | ||
id: get_changelog | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
validation_level: warn | ||
version: ${{ steps.get_version.outputs.version }} | ||
path: ./CHANGELOG.md | ||
- name: Create tag | ||
id: create_tag | ||
run: | | ||
TAG_NAME=${{ steps.get_changelog.outputs.version }} | ||
git tag $TAG_NAME | ||
echo "::set-output name=tag_name::$TAG_NAME" | ||
git push origin --tags | ||
- name: Create/update release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "${{ env.OUTPUT_NAME }}.taco" | ||
tag: ${{ steps.get_changelog.outputs.version }} | ||
name: ${{ steps.get_changelog.outputs.version }} | ||
body: ${{ steps.get_changelog.outputs.changes }} | ||
prerelease: ${{ steps.get_changelog.outputs.status == 'prereleased' }} | ||
draft: ${{ steps.get_changelog.outputs.status == 'unreleased' }} | ||
allowUpdates: true | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,3 @@ | ||
# Changelog | ||
|
||
## [Unreleased] |
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,55 @@ | ||
# 🌮 TacO Marker Pack Template | ||
|
||
This is a template for a [TacO](https://www.gw2taco.com/)/[Blish HUD](https://blishhud.com/) Marker Pack that features: | ||
* Auto Building and Releasing - Publish your marker pack automatically with GitHub actions and releases. | ||
* Changelog generation - Releases will have changelogs automatically added to them from the CHANGELOG.md | ||
* Local Install Script - A one-click install to test your marker pack locally. | ||
|
||
## 🛠️ Setup | ||
|
||
Setting this system up is extremely simple. | ||
|
||
* **Step 1.** Click "Use this template" -> "Create a new repository" and enter your repository name, description etc. | ||
* **Step 2.** Change Variables within the repository: | ||
* **Step 2.1**. Open ".github\workflows\build_and_release.yml" and change the variable "OUTPUT_NAME" to be the name of your marker pack such as "OUTPUT_NAME: example" will output a file called example.taco on release. | ||
* **Step 2.2**. Open "install.bat" and change the two variables near the top of the file. One is called "targetLocation" which is the path of where your marker packs are loaded from Taco or Blish HUD, this is where the script will install your marker pack to be tested. Finally, change the "fileName" variable to be the name of your marker pack, it ideally should match with the above changed "OUTPUT_NAME". | ||
* **Step 3.** Change README.md to fit your marker pack. | ||
|
||
|
||
## 📝 How To: Develop Marker Pack | ||
|
||
Make your marker pack as normal, you're still able to use multiple XML files, folders etc. while keeping a "[Unreleased]" section in your CHANGELOG.md and updating it with the development of your marker pack, this is what will be published with the future release of your marker pack. | ||
|
||
The CHANGELOG.md follows the format of [keep a changelog](https://keepachangelog.com/). | ||
Changelog Example: | ||
``` | ||
# Changelog | ||
## [Unreleased] | ||
### Added | ||
- Added X | ||
### Fixed | ||
- Fixed X | ||
## [1.0.0]- 2024-01-25 | ||
### Added | ||
- Marker Pack for X | ||
``` | ||
|
||
## 📥 How To: Install Locally | ||
|
||
Run the "install.bat" file, this will create a TacO file and place it in the targeted location as well as remove any old versions installed in there. | ||
|
||
## 📤 How To: Publish | ||
|
||
When you are ready to publish a new release you have to push a commit with the format of "[CI-BUILD] x.x.x ..." such as "[CI-BUILD] 1.0.0 Release" and then GitHub will pack all your files into a TacO file and push it as a release with the changes from the CHANGELOG.md. | ||
|
||
The best way to do this is to change the "[Unreleased]" tag to the next version of your marker pack such as "[1.0.1]" with the commit message of "[CI-BUILD] 1.0.1 Release". | ||
|
||
The two directories ".git" and ".github" as well as the file "install.bat", won't be published with any release. However, **all** other files and directories will. |
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,20 @@ | ||
@echo off | ||
setlocal | ||
|
||
:: Variables - Change these | ||
set "targetLocation=C:\path\to\markers" | ||
set "fileName=marker_pack_example" | ||
|
||
:: Delete old TacO file at target location | ||
if exist "%targetLocation%\%fileName%.taco" ( | ||
del /F "%targetLocation%\%fileName%.taco" | ||
) | ||
|
||
:: Build the TacO file | ||
powershell -NoProfile -Command "Get-ChildItem -Recurse .\* | Where-Object { $_.FullName -notmatch '.git' -and $_.FullName -notmatch '.github' -and $_.Name -ne 'install.bat' } | Compress-Archive -DestinationPath .\%fileName%.zip -Force" | ||
rename %fileName%.zip %fileName%.taco | ||
|
||
:: Move the TacO file to the target location | ||
move /Y "%fileName%.taco" "%targetLocation%" | ||
|
||
endlocal |
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,7 @@ | ||
<OverlayData> | ||
<MarkerCategory name="marker_pack_example" displayname="Marker Pack Example"> | ||
</MarkerCategory> | ||
<POIs> | ||
<POI MapID="50" xpos="-178" ypos="21" zpos="207" GUID="KwMlJ9dSTFqjwwAAXm8y/A"/> | ||
</POIs> | ||
</OverlayData> |