forked from il-mix/pulsar-chocolatey
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1.106.0-release
- Loading branch information
Showing
4 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Chocolatey Publish Pulsar Package | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout Latest Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Package | ||
run: | | ||
cd ./pulsar | ||
choco pack | ||
- name: Publish New Version | ||
run: | | ||
$fileName = ( Get-ChildItem -Path . -Filter pulsar.*.nupkg ) | ||
Write-Host "Publishing $fileName to Chocolatey" | ||
choco push $fileName --source https://push.chocolatey.org --apikey ${{ github.secrets.CHOCO_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Chocolatey Draft Publish Pulsar | ||
|
||
on: | ||
issues: | ||
types: [ labeled ] | ||
|
||
jobs: | ||
draft_publish: | ||
if: contains(github.event.issue.labels.*.name, 'release') | ||
runs-on: windows-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout Latest Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python Requirements | ||
run: pip install requests | ||
|
||
- name: Init New Version | ||
run: python init.py ${{ github.event.issue.title }} | ||
|
||
- name: Create Pull Request With Changes | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Draft ${{ github.event.issue.title }} Release | ||
branch: release-${{ github.event.issue.title }} | ||
delete-branch: true | ||
title: '[${{ github.event.issue.title }}] Draft Release' | ||
body: | | ||
Automated Draft of new Pulsar Chocolatey Release | ||
Will close #${{ github.event.issue.number }} | ||
draft: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Chocolatey Test Installation | ||
|
||
on: [ workflow_dispatch, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Current Version | ||
run: | | ||
cd ./pulsar | ||
choco pack | ||
- name: Install Current Version | ||
run: choco install pulsar --source . | ||
|
||
- name: Put Pulsar On the PATH | ||
run: | | ||
"$env:LOCALAPPDATA\Programs\Pulsar\" >> $env:GITHUB_PATH | ||
"$env:LOCALAPPDATA\Programs\Pulsar\resources\ppm\bin\" >> $env:GITHUB_PATH | ||
- name: Ensure Installation was successful | ||
id: pulsar-version | ||
run: | | ||
( | ||
pulsar --version | | ||
ConvertFrom-String -PropertyNames Application,Delimiter,Version | | ||
Where-Object {$_.Application -eq "Pulsar" } | | ||
Select-Object -Property @{n='version'; e={ return "$($PSItem.Application) $($PSItem.Version)" }} | ||
).version >> $env:GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters