diff --git a/.github/workflows/ModuleRelease.yaml b/.github/workflows/ModuleRelease.yaml index 5f350b729..81aed51ac 100644 --- a/.github/workflows/ModuleRelease.yaml +++ b/.github/workflows/ModuleRelease.yaml @@ -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#0.0.0#${{ github.event.inputs.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#0.0.0#${{ github.event.inputs.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 \ No newline at end of file + - 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 diff --git a/.github/workflows/PluginDeployment.yaml b/.github/workflows/PluginDeployment.yaml index 9bd0b700c..0937f4264 100644 --- a/.github/workflows/PluginDeployment.yaml +++ b/.github/workflows/PluginDeployment.yaml @@ -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#0.0.0#${{ github.event.inputs.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 \ No newline at end of file + - 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#0.0.0#${{ github.event.inputs.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