Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Jun 10, 2024
0 parents commit f1c5c05
Show file tree
Hide file tree
Showing 17 changed files with 2,555 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

ko_fi: solareon
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a bug report to help solve an issue
title: 'Bug: TITLE'
labels: New Issue
assignees: ''
---

**Describe the issue**

A clear and concise description of what the bug is.

**Expected behavior**

A clear and concise description of what you expected to happen.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


**Media**

If applicable, add a screenshot or a video to help explain your problem.

**Needed information (please complete the following information):**
- **Client Version:**: [e.g. Canary or Release]
- **Release Version:**: [e.g 1.0]

**Additional context**
Add any other context about the issue here.
13 changes: 13 additions & 0 deletions .github/actions/bump-manifest-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const fs = require("fs");

const version = process.env.TGT_RELEASE_VERSION;
const newVersion = version.replace("v", "");

const manifestFile = fs.readFileSync("fxmanifest.lua", { encoding: "utf8" });

const newFileContent = manifestFile.replace(
/\bversion\s+(.*)$/gm,
`version '${newVersion}'`
);

fs.writeFileSync("fxmanifest.lua", newFileContent);
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
tags:
- "v*.*.*"

jobs:
create-release:
name: Build and Create Tagged release
runs-on: ubuntu-latest

steps:
- name: Install archive tools
run: sudo apt install zip

- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}

- name: Get variables
id: get_vars
run: |
echo '::set-output name=SHORT_SHA::$(git rev-parse --short HEAD)'
echo '::set-output name=DATE::$(date +'%D')'
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Bump manifest version
run: node .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}

- name: Push manifest change
uses: EndBug/add-and-commit@v8
with:
add: fxmanifest.lua
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "chore: bump manifest version to ${{ github.ref_name }}"

- name: Update tag ref
uses: EndBug/latest-tag@latest
with:
tag-name: ${{ github.ref_name }}

- name: Bundle files
run: |
mkdir -p ./temp/slrn_groups
cp ./{README.md,LICENSE,fxmanifest.lua} ./temp/slrn_groups
cp -r ./{client,ui,server} ./temp/slrn_groups
cd ./temp && zip -r ../slrn_groups.zip ./slrn_groups
- name: Create Release
uses: "marvinpinto/action-automatic-releases@v1.2.1"
id: auto_release
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: "${{ env.RELEASE_VERSION }}"
prerelease: false
files: slrn_groups.zip

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit f1c5c05

Please sign in to comment.