Skip to content

Commit

Permalink
feat: initial release
Browse files Browse the repository at this point in the history
Release-As: 0.1.0
  • Loading branch information
Xenira committed Feb 10, 2024
0 parents commit 862398a
Show file tree
Hide file tree
Showing 50 changed files with 2,213 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*{.cs,.adoc,.sh}]
indent_style = tab
indent_size = 1
tab_width = 2
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
liberapay: rip3.141
github: Xenira
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: Xenira

---

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

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

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Desktop (please complete the following information):**
- OS: [e.g. Linux <Distro and Version>, Windows 10]
- Game and Version; [e.g. Techtonica v0.2.0h]
- Mod Version: 0.6.0 <!-- x-release-please-version -->

**Additional context**

<!-- Add any other context about the problem here. -->
<!-- Please attach the BepInEx log file (<game_folder>/BepInEx/LogOutput.log) -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEAT]"
labels: enhancement
assignees: Xenira

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
8 changes: 8 additions & 0 deletions .github/_typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[default.extend-identifiers]
FluffyUnderware = "FluffyUnderware"
"Edit_Shotcut" = "Edit_Shotcut"

[files]
extend-exclude = [
"unity/*",
]
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/plugin" # Location of package manifests
schedule:
interval: daily
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
72 changes: 72 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check typos
uses: crate-ci/typos@master
with:
config: .github/_typos.toml
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugin

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: plugin
path: |
./plugin/bin/Release/netstandard2.1/pi_utils.dll
./plugin/bin/Release/netstandard2.1/pi_utils.pdb
if-no-files-found: error

package:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: plugin
- name: Copy Files
run: |
mkdir -p ./artifact/BepInEx/plugins/pi_utils
cp pi_utils.* ./artifact/BepInEx/plugins/pi_utils
cp {README.adoc,CHANGELOG.md,LICENSE,manifest.json,icon.png} ./artifact/
- name: Upload Release Asset Artifact
uses: actions/upload-artifact@v4
with:
name: release-artifact
path: artifact


84 changes: 84 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
on:
workflow_run:
workflows: [".Net"]
branches: ["master"]
types:
- completed

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- id: release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
- name: Download release artifact
if: ${{ steps.release.outputs.release_created }}
uses: actions/download-artifact@v4
with:
name: release-artifact
path: artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Zip release artifact
if: ${{ steps.release.outputs.release_created }}
run: |
cd artifact && npx downdoc -a env-github -a env-thunderstore README.adoc && zip -r pi_utils-${{ steps.release.outputs.tag_name }}-thunderstore.zip ./ && cd ..
mv artifact/pi_utils-${{ steps.release.outputs.tag_name }}-thunderstore.zip .
rm artifact/README.md
cd artifact && zip -r pi_utils-${{ steps.release.outputs.tag_name }}.zip ./ && cd ..
mv artifact/pi_utils-${{ steps.release.outputs.tag_name }}.zip .
- name: Upload release artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} pi_utils-${{ steps.release.outputs.tag_name }}.zip --repo ${{ github.repository }}
- name: Upload to Thunderstore
uses: GreenTF/upload-thunderstore-package@v4.3
if: ${{ steps.release.outputs.release_created }}
with:
namespace: "3_141"
community: techtonica
name: Pi Utils
description: Utilities for my mods
categories: |
libraries
tools
misc
file: pi_utils-${{ steps.release.outputs.tag_name }}-thunderstore.zip
version: "${{ steps.release.outputs.major }}.${{ steps.release.outputs.major }}.${{ steps.release.outputs.patch }}"
repo: thunderstore.io
token: ${{ secrets.THUNDERSTORE_KEY }}

nuget:
runs-on: windows-2019
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
- name: Download release artifact
uses: actions/download-artifact@v4
with:
name: release-artifact
path: artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Strip release artifact
run: |
./tools/NStrip.exe -cg -p --cg-exclude-events artifact/BepInEx/plugins/pi_utils/pi_utils.dll ./nuget/lib
- name: Pack nuget
run: nuget pack nuget -OutputFileNamesWithoutVersion -OutputDirectory build -Properties "git=https://github.com/${{ github.repository }}.git;name=${{ github.event.repository.name }};author=${{ github.repository_owner }};description=${{ github.event.repository.description }}"
- name: Publish nuget
run: |
nuget push "build/${{ github.event.repository.name }}.nupkg" -ApiKey ${{ secrets.NUGET_KEY }} -Source https://api.nuget.org/v3/index.json
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/plugin/obj/
/plugin/bin/
/libs/
/strip-dll/
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"conventionalCommits.scopes": []
}
Empty file added CHANGELOG.md
Empty file.
Loading

0 comments on commit 862398a

Please sign in to comment.