mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: Publish release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
major:
|
|
description: 'Major'
|
|
required: true
|
|
type: number
|
|
minor:
|
|
description: 'Minor'
|
|
required: true
|
|
type: number
|
|
patch:
|
|
description: 'Patch'
|
|
required: true
|
|
type: number
|
|
tag:
|
|
description: 'Tag'
|
|
required: false
|
|
type: string
|
|
prerelease:
|
|
description: 'Prerelease'
|
|
required: true
|
|
type: boolean
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2025-vs2026
|
|
outputs:
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
strategy:
|
|
matrix:
|
|
platform: ["x64", "ARM64"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Setup Conan
|
|
run: pip install conan
|
|
|
|
- name: Generate tag
|
|
id: tag
|
|
run: |
|
|
$tag = "${{ inputs.tag }}" -eq "" ? "v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }}" : "${{ inputs.tag }}"
|
|
echo "tag=$tag" >> $env:GITHUB_OUTPUT
|
|
|
|
- name: Build
|
|
run: |
|
|
$versionString = "${{ steps.tag.outputs.tag }}" -replace "^v(?=\d)", ""
|
|
python scripts/publish.py --compiler=ClangCL --platform=${{ matrix.platform }} --version-major=${{ inputs.major }} --version-minor=${{ inputs.minor }} --version-patch=${{ inputs.patch }} --version-string=$versionString --pfx-path=certs\Magpie.pfx --pfx-password="${{ secrets.MAGPIE_PFX_PASSWORD }}"
|
|
|
|
- name: Store artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Magpie-${{ steps.tag.outputs.tag }}-${{ matrix.platform }}
|
|
path: publish/${{ matrix.platform }}
|
|
release:
|
|
runs-on: windows-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Setup Requests
|
|
run: pip install requests
|
|
|
|
- name: Restore artifacts
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: publish
|
|
|
|
- name: Publish release
|
|
run: python scripts/release.py ${{ inputs.major }} ${{ inputs.minor }} ${{ inputs.patch }} ${{ needs.build.outputs.tag }} ${{ inputs.prerelease }} ${{ secrets.CONTENTS_ACCESS_TOKEN }}
|