Skip to content

Commit bce769a

Browse files
authored
Merge pull request #30 from microsoft/leonidz/workflow_fix
Create a simple "make-release" action
2 parents 5f2e5ab + c48f19c commit bce769a

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test-release-action
1+
name: make-release
22

33
on:
44
workflow_dispatch:
@@ -11,20 +11,27 @@ on:
1111
jobs:
1212
create-release:
1313
runs-on: windows-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- name: Check out repository
1618
uses: actions/checkout@v4
1719

1820
- name: Create artifacts directory
19-
run: mkdir bin
21+
run: mkdir bin\MSO-Scripts
2022

21-
- name: Copy scripts
22-
run: xcopy /e /i src bin
23-
24-
- name: Authenticate GitHub CLI
25-
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
23+
- name: Create archive with all scripts
24+
shell: pwsh
25+
run: |
26+
Get-ChildItem -Path "src" -File | Copy-Item -Destination "bin\MSO-Scripts"
27+
Copy-Item -Path "src\BETA" -Destination "bin\MSO-Scripts\BETA" -Recurse
28+
Copy-Item -Path "src\OETW" -Destination "bin\MSO-Scripts\OETW" -Recurse
29+
Copy-Item -Path "src\PreWin10" -Destination "bin\MSO-Scripts\PreWin10" -Recurse
30+
Copy-Item -Path "src\WPAP" -Destination "bin\MSO-Scripts\WPAP" -Recurse
31+
Copy-Item -Path "src\WPRP" -Destination "bin\MSO-Scripts\WPRP" -Recurse
32+
Compress-Archive -Path "bin\MSO-Scripts" -DestinationPath "bin\MSO-Scripts-${{ inputs.version }}.zip"
2633
2734
- name: Publish release
28-
run: gh release create v${{ inputs.version }} --title "Release v${{ inputs.version }}" bin --notes "Manual release"
35+
run: gh release create v${{ inputs.version }} --title "Release v${{ inputs.version }}" "bin\MSO-Scripts-${{ inputs.version }}.zip" --notes "Manual release"
2936
env:
3037
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)