Skip to content

Commit

Permalink
Split out Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
briandenicola committed Jun 15, 2022
1 parent 726e672 commit 85c3026
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PowerShell Publish Nuget package
on: [push]
jobs:
nuget_publish:
runs-on: windows-latest

steps:
- uses: actions/checkout@master
- name: Replace Name of Repository
run: |
(Get-Content .\bjd.Common.Functions\bjd.Common.Functions.nuspec -Raw).Replace('bjd.Common.Functions','PSScripts') |
Out-File .\bjd.Common.Functions\bjd.Common.Functions.nuspec
shell: pwsh

- name: Setup Nuget.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'

- name: Add private GitHub registry to NuGet
run: nuget sources add -name "PSScripts" -Source https://nuget.pkg.github.com/bjd145/index.json -Username bjd145 -Password ${{ secrets.MY_GITHUB_TOKEN }}

- name: Nuget Pack
run: nuget pack bjd.Common.Functions/bjd.Common.Functions.nuspec

- name: Nuget Push
run: nuget push *.nupkg -Source "PSScripts" -SkipDuplicate
36 changes: 9 additions & 27 deletions .github/workflows/publish.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
name: PowerShell Publish
on: [push]
jobs:
nuget_publish:
runs-on: windows-latest

steps:
- uses: actions/checkout@master
- name: Replace Name of Repository
run: |
(Get-Content .\bjd.Common.Functions\bjd.Common.Functions.nuspec -Raw).Replace('bjd.Common.Functions','PSScripts') |
Out-File .\bjd.Common.Functions\bjd.Common.Functions.nuspec
shell: pwsh

- name: Setup Nuget.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'

- name: Add private GitHub registry to NuGet
run: nuget sources add -name "PSScripts" -Source https://nuget.pkg.github.com/bjd145/index.json -Username bjd145 -Password ${{ secrets.MY_GITHUB_TOKEN }}

- name: Nuget Pack
run: nuget pack bjd.Common.Functions/bjd.Common.Functions.nuspec

- name: Nuget Push
run: nuget push *.nupkg -Source "PSScripts" -SkipDuplicate
name: PowerShell Publish Module

on:
workflow_dispatch:
inputs:
tag:
description: 'The Release tag for this run'
required: true
default: '3.5.9'
jobs:
create_release_tag:
runs-on: windows-latest

Expand Down

0 comments on commit 85c3026

Please sign in to comment.