mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-12-01 03:18:11 +03:00
use bash for Windows publish job (#16607)
This commit is contained in:
parent
d9b331909a
commit
704e876386
47
.github/workflows/build-windows-installer.yml
vendored
47
.github/workflows/build-windows-installer.yml
vendored
@ -273,6 +273,9 @@ jobs:
|
||||
publish:
|
||||
name: Publish EXE
|
||||
runs-on: [windows-2019]
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
needs:
|
||||
- build
|
||||
timeout-minutes: 5
|
||||
@ -312,7 +315,7 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: chia-installers-windows-exe-intel
|
||||
path: chia-blockchain-gui\release-builds\
|
||||
path: chia-blockchain-gui/release-builds/
|
||||
|
||||
- name: Set Env
|
||||
uses: Chia-Network/actions/setjobenv@main
|
||||
@ -321,7 +324,6 @@ jobs:
|
||||
|
||||
- name: Test for secrets access
|
||||
id: check_secrets
|
||||
shell: bash
|
||||
run: |
|
||||
unset HAS_AWS_SECRET
|
||||
unset HAS_GLUE_SECRET
|
||||
@ -338,6 +340,7 @@ jobs:
|
||||
|
||||
- name: Install AWS CLI
|
||||
if: steps.check_secrets.outputs.HAS_AWS_SECRET
|
||||
shell: pwsh
|
||||
run: |
|
||||
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
|
||||
|
||||
@ -350,7 +353,6 @@ jobs:
|
||||
|
||||
- name: Upload to s3
|
||||
if: steps.check_secrets.outputs.HAS_AWS_SECRET
|
||||
shell: bash
|
||||
run: |
|
||||
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
|
||||
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
|
||||
@ -360,64 +362,51 @@ jobs:
|
||||
aws s3 cp chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${CHIA_INSTALLER_VERSION}.exe s3://download.chia.net/dev/ChiaSetup-${CHIA_DEV_BUILD}.exe
|
||||
|
||||
- name: Create Checksums
|
||||
shell: pwsh
|
||||
run: |
|
||||
certutil.exe -hashfile ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe SHA256 > ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256
|
||||
ls ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\
|
||||
certutil.exe -hashfile ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe SHA256 > ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256
|
||||
ls ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/
|
||||
|
||||
- name: Create torrent
|
||||
if: env.FULL_RELEASE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe -o ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent --webseed https://download.chia.net/install/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe
|
||||
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe -o ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent --webseed https://download.chia.net/install/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe
|
||||
ls
|
||||
gh release upload $env:RELEASE_TAG ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent
|
||||
gh release upload $env:RELEASE_TAG ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent
|
||||
|
||||
- name: Upload Dev Installer
|
||||
if: steps.check_secrets.outputs.HAS_AWS_SECRET && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
aws s3 cp ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe s3://download.chia.net/latest-dev/ChiaSetup-latest-dev.exe
|
||||
aws s3 cp ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256 s3://download.chia.net/latest-dev/ChiaSetup-latest-dev.exe.sha256
|
||||
aws s3 cp ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe s3://download.chia.net/latest-dev/ChiaSetup-latest-dev.exe
|
||||
aws s3 cp ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256 s3://download.chia.net/latest-dev/ChiaSetup-latest-dev.exe.sha256
|
||||
|
||||
- name: Upload Release Files
|
||||
if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.FULL_RELEASE == 'true'
|
||||
run: |
|
||||
aws s3 cp ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe s3://download.chia.net/install/
|
||||
aws s3 cp ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256 s3://download.chia.net/install/
|
||||
aws s3 cp ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent s3://download.chia.net/torrents/
|
||||
aws s3 cp ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe s3://download.chia.net/install/
|
||||
aws s3 cp ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.sha256 s3://download.chia.net/install/
|
||||
aws s3 cp ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe.torrent s3://download.chia.net/torrents/
|
||||
|
||||
- name: Upload release artifacts
|
||||
if: env.RELEASE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload $env:RELEASE_TAG ${{ github.workspace }}\chia-blockchain-gui\release-builds\windows-installer\ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe
|
||||
gh release upload $env:RELEASE_TAG ${{ github.workspace }}/chia-blockchain-gui/release-builds/windows-installer/ChiaSetup-${{ env.CHIA_INSTALLER_VERSION }}.exe
|
||||
|
||||
- uses: Chia-Network/actions/github/jwt@main
|
||||
|
||||
- name: Mark pre-release installer complete
|
||||
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && env.PRE_RELEASE == 'true'
|
||||
run: |
|
||||
$headers = @{
|
||||
Authorization="Bearer ${{ env.JWT_TOKEN }}"
|
||||
}
|
||||
$data = @{
|
||||
chia_ref='${{ env.RELEASE_TAG }}'
|
||||
}
|
||||
$json = $data | ConvertTo-Json
|
||||
$response = Invoke-RestMethod '${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}-prerelease/${{ env.RELEASE_TAG }}/success/build-windows' -Method Post -Body $json -ContentType 'application/json' -Headers $headers
|
||||
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"chia_ref": "${{ env.RELEASE_TAG }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}-prerelease/${{ env.RELEASE_TAG }}/success/build-windows
|
||||
|
||||
- name: Mark release installer complete
|
||||
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && env.FULL_RELEASE == 'true'
|
||||
run: |
|
||||
$headers = @{
|
||||
Authorization="Bearer ${{ env.JWT_TOKEN }}"
|
||||
}
|
||||
$data = @{
|
||||
chia_ref='${{ env.RELEASE_TAG }}'
|
||||
}
|
||||
$json = $data | ConvertTo-Json
|
||||
$response = Invoke-RestMethod '${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}/${{ env.RELEASE_TAG }}/success/build-windows' -Method Post -Body $json -ContentType 'application/json' -Headers $headers
|
||||
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"chia_ref": "${{ env.RELEASE_TAG }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}/${{ env.RELEASE_TAG }}/success/build-windows
|
||||
|
||||
test:
|
||||
name: Test ${{ matrix.os.name }}
|
||||
|
Loading…
Reference in New Issue
Block a user