Assemble Toolkit #352
This file contains hidden or 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
| 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@v6 | |
| - name: Assemble tookit | |
| run: .\Build-Toolkit.ps1 | |
| shell: powershell | |
| - name: Verify archive | |
| run: 7z t Toolkit.7z | |
| shell: powershell | |
| - name: Create hash of archive | |
| run: Get-FileHash -Algorithm SHA256 .\Toolkit.7z | Format-List | Out-File -FilePath Hash.txt -Encoding "utf8" | |
| shell: powershell | |
| - name: Create release for the 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.7z Hash.txt Metadata.json | |
| shell: powershell | |
| - name: Update release information file | |
| run: git config --global user.email "[email protected]"; git config --global user.name "GHActionBot"; git commit -m "Sync release file" last_release_info.txt; git push |