Skip to content

Commit

Permalink
update workflow to upload nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune580 committed Dec 13, 2023
1 parent 86a2a52 commit 2719812
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
build:
Expand All @@ -26,21 +27,36 @@ jobs:
- name: Grant execute permissions for build script
run: chmod +x build.sh

- name: Build
- name: Build Thunderstore Package
run: ./build.sh --configuration=Release --target=BuildThunderstore

- name: Build NuGet Package
run: ./build.sh --configuration=Release --target=BuildNuGet

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: input-utils
path: LethalCompanyInputUtils/bin/Release/netstandard2.1/upload/
retention-days: 30

- name: Setup NuGet Push Source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Rune580/index.json"

- name: Get NuGet Package path
run: |
for fn in LethalCompanyInputUtils/bin/Release/netstandard2.1/artifacts/*.nupkg; do echo "NUGET_PKG_PATH=${fn}" >> "$GITHUB_ENV"; done;
shell: bash
continue-on-error: true

- name: Push NuGet Package
run: dotnet nuget push "${NUGET_PKG_PATH}" --source "github"

- name: Delete old release if it already exists
run: gh release delete --yes "${RELEASE_VERSION}"
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.RELEASES_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release under current tag
run: |
Expand Down Expand Up @@ -75,4 +91,4 @@ jobs:
repo: thunderstore.io
categories: |
libraries
file: ${{ env.THUNDERSTORE_PKG_PATH }}
file: ${{ env.THUNDERSTORE_PKG_PATH }}

0 comments on commit 2719812

Please sign in to comment.