Skip to content

Commit

Permalink
some fixes (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Hegedus <jhegedus9@gmail.com>
  • Loading branch information
joshika39 and Joshua Hegedus committed Apr 12, 2023
1 parent a98e4a4 commit d01aaf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/modules-cicd.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI

# on:
# push:
# branches:
# - master
on:
push:
branches:
- master
# pull_request:
# branches:
# - master
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ name: CD


on:
# workflow_run:
# workflows: ["CI"]
# branches: [ master ]
# types:
# - completed
push:
branches:
- master
workflow_run:
workflows: ["CI"]
branches: [ master ]
types:
- completed

jobs:
build:

env:
BUILD_CONFIG: 'Release'
SOLUTION: './Solution/Modules.sln'
MESSAGE: $(git log -1 --no-merges --pretty='format:%C(auto)%s')

runs-on: windows-latest

Expand All @@ -31,8 +27,8 @@ jobs:
run: |
Get-ChildItem
Import-Module .\Solution\Tools\GetBuildVersion.psm1
Write-Host $env:MESSAGE
$version = GetBuildVersion -VersionString $env:MESSAGE
Write-Host $(git log -1 --no-merges --pretty='format:%C(auto)%s')
$version = GetBuildVersion -VersionString $(git log -1 --no-merges --pretty='format:%C(auto)%s')
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

Expand All @@ -54,7 +50,7 @@ jobs:
run: dotnet test $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal

- name: Publish
if: startsWith(github.ref, 'refs/heads/release')
if: startsWith(github.ref, 'refs/heads/master')
run: |
dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}
dotnet nuget push **\*.nupkg --source 'https://nuget.pkg.github.com/joshika39/index.json' --api-key ${{secrets.GIT_API_KEY}}

0 comments on commit d01aaf7

Please sign in to comment.