chore: forgejo workflows
Some checks failed
Run tests on push / Test EDNA (push) Failing after 2m2s
Some checks failed
Run tests on push / Test EDNA (push) Failing after 2m2s
This commit is contained in:
parent
a3b68ffae1
commit
1f091460bf
3 changed files with 85 additions and 1 deletions
55
.forgejo/workflows/create-release.yaml
Normal file
55
.forgejo/workflows/create-release.yaml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
name: Create release on tag push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'release/*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Create release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .Net
|
||||||
|
uses: actions/setup-dotnet@v2
|
||||||
|
with:
|
||||||
|
dotnet-version: '7.0.x'
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build -c release
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: dotnet test
|
||||||
|
|
||||||
|
- name: Create NuGet package
|
||||||
|
run: dotnet pack -c release
|
||||||
|
|
||||||
|
- name: Push NuGet package
|
||||||
|
run: dotnet nuget push "Edna/bin/Release/alterNERDtive.EDNA.*.nupkg" --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_AUTH_TOKEN}}
|
||||||
|
|
||||||
|
- name: Get release body
|
||||||
|
run: |
|
||||||
|
echo "release_body=$(cat CHANGELOG.md)" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '>=1.20.1'
|
||||||
|
|
||||||
|
- name: Draft release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
body: ${{ env.release_body }}
|
||||||
|
files: |-
|
||||||
|
Edna/bin/Release/alterNERDtive.EDNA.*.nupkg
|
||||||
|
draft: true
|
||||||
|
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
29
.forgejo/workflows/push-test.yaml
Normal file
29
.forgejo/workflows/push-test.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Run tests on push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Test EDNA
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup .Net
|
||||||
|
uses: actions/setup-dotnet@v2
|
||||||
|
with:
|
||||||
|
dotnet-version: '7.0.x'
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build -c release
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: dotnet test
|
2
.github/workflows/create-release.yaml
vendored
2
.github/workflows/create-release.yaml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Setup .Net
|
- name: Setup .Net
|
||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: '6.0.x'
|
dotnet-version: '7.0.x'
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
Loading…
Reference in a new issue