-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (40 loc) · 1.46 KB
/
assemble_toolkit.yml
File metadata and controls
40 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Assemble Toolkit
# See https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * 6"
push:
branches:
- main
paths:
- "**/*.ps1"
permissions: read-all
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Assemble tookit
run: .\Build-Toolkit.ps1
shell: powershell
- name: Verify ZIP archive
run: 7z t Toolkit.zip
shell: powershell
- name: Create hash of archive
run: Get-FileHash -Algorithm SHA256 .\Toolkit.zip | Format-List | Out-File -FilePath Hash.txt -Encoding "utf8"
shell: powershell
- name: Create release for the ZIP archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_REF: ${{ github.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
$TAG=Get-Date -UFormat "%Y%d%m%H%m"
gh release create "$TAG" --latest --repo="$env:GITHUB_REPOSITORY" --title="Bundle build from commit $env:COMMIT_REF" --generate-notes Toolkit.zip Hash.txt Metadata.json
shell: powershell
- name: Update release information file
run: git config --global user.email "gha@github.com"; git config --global user.name "GHActionBot"; git commit -m "Sync release file" last_release_info.txt; git push