mirror of
https://github.com/omegaleo/SecretSecurity.git
synced 2026-11-08 17:43:29 +00:00
Initial implementation
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build
|
||||
run: dotnet build SecretSecurity/SecretSecurity.csproj --configuration Release
|
||||
|
||||
- name: Pack NuGet tool
|
||||
run: >
|
||||
dotnet pack SecretSecurity/SecretSecurity.csproj
|
||||
--configuration Release
|
||||
--no-build
|
||||
-p:Version=${{ steps.version.outputs.VERSION }}
|
||||
--output ./nupkg
|
||||
|
||||
- name: Push to GitHub Packages
|
||||
run: >
|
||||
dotnet nuget push ./nupkg/*.nupkg
|
||||
--api-key ${{ secrets.GITHUB_TOKEN }}
|
||||
--source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ./nupkg/*.nupkg
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user