Skip to content

Commit

Permalink
fix(actions): honestly i hate this week
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Jan 4, 2024
1 parent 00f9780 commit d2dc552
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
description: "Packages to release"
required: false
type: choice
default: "DisCatSharp"
options:
- "DisCatSharp"
- "DisCatSharp.Attributes"
Expand Down Expand Up @@ -58,41 +59,40 @@ jobs:
8.0.100
7.0.404
- name: Restore dependencies (DisCatSharp)
if: ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp'
if: ${{ github.event.inputs.packages_to_release == 'DisCatSharp' }}
run: dotnet restore --no-cache -f -v minimal DisCatSharp.sln
- name: Restore dependencies (DisCatSharp.Attributes)
if: ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Attributes'
if: ${{ github.event.inputs.packages_to_release == 'DisCatSharp.Attributes' }}
run: dotnet restore --no-cache -f -v minimal DisCatSharp.Attributes/DisCatSharp.Attributes.csproj
- name: Restore dependencies (DisCatSharp.Tools)
if: ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Tools'
if: ${{ github.event.inputs.packages_to_release == 'DisCatSharp.Tools' }}
run: dotnet restore --no-cache -f -v minimal DisCatSharp.Tools/DisCatSharp.Tools.sln
- name: Build DisCatSharp as full release
if: ${{!inputs.release_as_prerelease}}
if: ${{!inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp'}}
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-lib.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Build DisCatSharp as pre-release
if: ${{inputs.release_as_prerelease}}
if: ${{inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp'}}
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-lib.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release -VersionSuffix ${{github.event.inputs.version_suffix}}
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Build DisCatSharp.Attributes as full release
if: ${{!inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Attributes'
if: ${{!inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp.Attributes'}}
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-attributes.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release
- name: Build DisCatSharp.Attributes as pre-release
if: ${{inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Attributes'
if: ${{inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp.Attributes'}}
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-attributes.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release -VersionSuffix ${{github.event.inputs.version_suffix}}
- name: Build DisCatSharp.Tools as full release
if: ${{!inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Tools'
if: ${{!inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp.Tools'}}
shell: pwsh
run: ./DisCatSharp.Tools/rebuild-tools.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release
- name: Build DisCatSharp.Tools as pre-release
if: ${{inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp.Tools'
shell: pwsh
if: ${{inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp.Tools'}}
run: ./DisCatSharp.Tools/rebuild-tools.ps1 -ArtifactLocation ./dcs-artifacts -Configuration Release -VersionSuffix ${{github.event.inputs.version_suffix}}
- name: Remove invalid packages
shell: pwsh
Expand All @@ -107,20 +107,20 @@ jobs:
run: dotnet nuget push --source https://nuget.pkg.github.com/Aiko-IT-Systems/index.json -k ${{secrets.NYUW_TOKEN_GH}} *
working-directory: ./dcs-artifacts
- name: Set outputs
if: ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp'
if: ${{ github.event.inputs.packages_to_release == 'DisCatSharp' }}
id: vars
run: |
echo "version=10.6.0" >> $GITHUB_OUTPUT
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: "Create Sentry prod release"
if: ${{!inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp'
if: ${{ !inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp' }}
uses: getsentry/[email protected]
with:
environment: prod
ignore_missing: true
version: DisCatSharp@${{ steps.vars.outputs.version }}+${{ steps.vars.outputs.sha }}
- name: "Create Sentry dev release"
if: ${{inputs.release_as_prerelease}} && ${{ github.event.inputs.packages_to_release }} == 'DisCatSharp'
if: ${{ inputs.release_as_prerelease && github.event.inputs.packages_to_release == 'DisCatSharp' }}
uses: getsentry/[email protected]
with:
environment: dev
Expand Down

0 comments on commit d2dc552

Please sign in to comment.