Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
negrifelipe committed Oct 6, 2024
1 parent 006eb23 commit 5700aa2
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 76 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/ModuleRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,61 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Module Version (SemVer: https://semver.org)'
description: "Module Version (SemVer: https://semver.org)"
required: true

jobs:
deploy:
name: "GitHub Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout Repository

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Install zip
run: sudo apt-get install zip

- name: Install dependencies
run: dotnet restore

- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" UnturnedImages/UnturnedImages.csproj"

- name: Build
run: dotnet build ./tools/UnturnedImages.Module/UnturnedImages.Module.csproj --configuration Release --no-restore

- name: Zip release
run: |
cd "./tools/UnturnedImages.Module/bin/Release/net461"
mkdir UnturnedImages
mv *.dll UnturnedImages
mv *.module UnturnedImages
zip -qr ../../../../../Release.zip UnturnedImages/
cd ../../../../../
shell: bash
- uses: actions/checkout@v2
name: Checkout Repository

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Install zip
run: sudo apt-get install zip

- name: Install dependencies
run: dotnet restore

- name: Update version
run: 'sed -i "s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#" UnturnedImages/UnturnedImages.csproj'

- name: Build
run: dotnet build ./tools/UnturnedImages.Module/UnturnedImages.Module.csproj --configuration Release --no-restore

- name: Zip release
run: |
cd "./tools/UnturnedImages.Module/bin/Release/net48"
mkdir UnturnedImages
mv *.dll UnturnedImages
mv *.module UnturnedImages
zip -qr ../../../../../Release.zip UnturnedImages/
cd ../../../../../
shell: bash

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: "UnturnedImages.Module v${{ github.event.inputs.version }}"
draft: true
prerelease: false

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: "UnturnedImages.Module v${{ github.event.inputs.version }}"
draft: true
prerelease: false

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Release.zip
asset_name: "UnturnedImages.Module.zip"
asset_content_type: application/zip
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Release.zip
asset_name: "UnturnedImages.Module.zip"
asset_content_type: application/zip
50 changes: 25 additions & 25 deletions .github/workflows/PluginDeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Plugin Version (SemVer: https://semver.org)'
description: "Plugin Version (SemVer: https://semver.org)"
required: true
jobs:
deploy:
name: "NuGet Deployment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout Repository
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Install dependencies
run: dotnet restore
- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" UnturnedImages/UnturnedImages.csproj"
- name: Build
run: dotnet build UnturnedImages/UnturnedImages.csproj --configuration Release --no-restore
- name: Push to NuGet
run: dotnet nuget push UnturnedImages/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
--skip-duplicate
- name: Push to GitHub
run: dotnet nuget push UnturnedImages/bin/Release/*.nupkg
--api-key ${{ secrets.GITHUB_TOKEN }}
--source https://nuget.pkg.github.com/silksplugins/index.json
--skip-duplicate
- uses: actions/checkout@v2
name: Checkout Repository
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Update version
run: 'sed -i "s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#" UnturnedImages/UnturnedImages.csproj'
- name: Build
run: dotnet build UnturnedImages/UnturnedImages.csproj --configuration Release --no-restore
- name: Push to NuGet
run: dotnet nuget push UnturnedImages/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
--skip-duplicate
- name: Push to GitHub
run: dotnet nuget push UnturnedImages/bin/Release/*.nupkg
--api-key ${{ secrets.GITHUB_TOKEN }}
--source https://nuget.pkg.github.com/silksplugins/index.json
--skip-duplicate

0 comments on commit 5700aa2

Please sign in to comment.