Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bellpepper0606 authored Jul 31, 2024
0 parents commit 8dd4a0b
Show file tree
Hide file tree
Showing 20 changed files with 1,407 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: MSBuild

on:
pull_request:
push:
branches:
- main
- develop
paths:
- '*/**'
- '!./*'
- './*.sln'
- '!.github/**'

jobs:
build:
name: MSBuild
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0

- name: Restore nuget packages
run: dotnet restore AtsExCsTemplate.sln --locked-mode

- name: MSBuild
run: dotnet publish .\AtsExCsTemplate.sln --configuration Release --no-restore /p:platform="Any CPU" /p:OutputPath="./out/"

- name: Collect artifact
run: |
ls -alR
mkdir plugins/
find . -type f -path '*/out/publish/*.dll' | xargs mv -t ./plugins/
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: plugins
path: ./plugins/
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Create release
on:
workflow_dispatch:
pull_request:
branches:
- main
types:
- closed

jobs:
build:
name: Generate dll
runs-on: windows-latest
outputs:
name: ${{ steps.version.outputs.name }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
- name: Restore nuget packages
run: dotnet restore AtsExCsTemplate.sln --locked-mode
- name: Build sln
run: dotnet publish .\AtsExCsTemplate.sln --configuration Release --no-restore /p:platform="Any CPU" /p:OutputPath="./out/"
- name: Collect artifact
run: |
mkdir plugins/
find . -type f -path '*/out/publish/*.dll' | xargs mv -t ./plugins/
shell: bash
- name: Check assembly version
id: version
run: |
Get-ChildItem plugins/ -Recurse -Filter "*.dll" -File | foreach {
Write-Output $_.FileName
$_.FileName
"name=$_" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
$ver=(Get-Item $_.FullName).VersionInfo.FileVersion
$ver
"version=v$ver" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
shell: pwsh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: plugins
path: ./plugins/

release:
name: Create release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create tag
run: |
git tag ${{needs.build.outputs.version}}
git push origin ${{needs.build.outputs.version}}
- name: Get repository name
run: |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" >> $GITHUB_ENV
echo "FILE_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}_${{needs.build.outputs.version}}" >> $GITHUB_ENV
- name: Compress DLLs
run: |
cd plugins/
zip ${{env.FILE_NAME}}.zip -r *
- name: Create Release Draft and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: ${{needs.build.outputs.version}}
name: Release ${{needs.build.outputs.version}}
body: TODO New Release.
draft: true
prerelease: false
files: |
./plugins/${{env.FILE_NAME}}.zip
LICENSE
Loading

0 comments on commit 8dd4a0b

Please sign in to comment.