Skip to content

Commit

Permalink
Created seperate psgallery_release job
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael LoPresti committed Oct 16, 2023
1 parent 2034f22 commit b9d5067
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/ci.github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ jobs:
path: dist/ValidateJson.zip
retention-days: 7

release:
gh_release:
needs: package
permissions:
contents: write
runs-on: windows-latest
# if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
defaults:
run:
shell: ${{ env.SHELL }}
Expand Down Expand Up @@ -137,11 +137,40 @@ jobs:
files: |
ValidateJson-${{ steps.version.outputs.version_number }}.zip
psgallery_release:
needs: package
runs-on: windows-latest
# if: ${{ github.ref == 'refs/heads/main' }}
defaults:
run:
shell: ${{ env.SHELL }}
steps:
- uses: actions/checkout@v4

- name: Setup Environment
uses: "./.github/template/setup"
with:
shell: ${{ env.SHELL }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build Prod Tag
id: prod_tag
if: github.ref == 'refs/heads/main'
env:
VERSION: ${{ steps.version.outputs.version_number }}
RUN_ID: ${{ github.run_id }}
run: |
Write-Output "tag=latest" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
Write-Output "release_name=v$env:VERSION" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Get Merged Pull Request
id: merged_pr
uses: actions-ecosystem/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Powershell Gallery
# if: ${{ github.ref == 'refs/heads/main' }}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
RELEASE_NOTES: ${{ steps.merged_pr.body || github.event.pull_request.description || 'GITHUB TEST DEPLOY' }}
run: |
Install-Module "InvokeBuild" -Scope CurrentUser -Force
Invoke-Build publish
run: Invoke-Build publish

0 comments on commit b9d5067

Please sign in to comment.