Skip to content

Commit

Permalink
bump-winget
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible committed Jun 19, 2023
1 parent 99bc3bb commit ea586d6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
if: matrix.target_os == 'windows'
run: |
echo AZQR_OUTPUT_FOLDER=${{ env.ARCHIVE_OUTDIR }}/${{ matrix.target_os }}/${{ matrix.target_arch }} >> $env:GITHUB_ENV
- name: Create output folder
run: |
mkdir -p ${{ env.AZQR_OUTPUT_FOLDER }}
Expand Down Expand Up @@ -204,11 +204,11 @@ jobs:
if: matrix.os != 'windows-latest'
run: |
sha256sum ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}/azqr > ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}.sha256
- name: Create sha256 Checksums for windows
if: matrix.os == 'windows-latest'
run: |
sha256sum ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}/azqr.exe > ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}.exe.sha256
sha256sum ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}/azqr.exe > ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}.exe.sha256
- name: upload linux & mac artifacts
if: matrix.os != 'windows-latest'
Expand Down Expand Up @@ -253,3 +253,9 @@ jobs:
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.AZQR_ARTIFACT_NAME }}.exe.sha256
asset_name: ${{ env.AZQR_ARTIFACT_NAME }}.exe.sha256
asset_content_type: application/octet-stream

- name: Trigger Bump Winget
uses: peter-evans/repository-dispatch@v2
with:
event-type: bump-winget
client-payload: '{"version": "${{ github.ref }}"}'
41 changes: 41 additions & 0 deletions .github/workflows/bump-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bump azqr version on winget

on:
workflow_dispatch:
inputs:
version:
description: 'SemVer format release tag, i.e. 0.24.5'
required: true
repository_dispatch:
types: [ bump-winget ]

jobs:
winget-bump:
name: Bump Dolt winget
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- name: Get version
id: get_version
run: |
version=""
if [ "${{ github.event_name }}" == "repository_dispatch" ]
then
version="${{ github.event.client_payload.version }}"
else
version="${{ github.event.inputs.version }}"
fi
if [[ $version == v* ]]; then
version="${version:1}"
fi
echo "::set-output name=version::$version"
- name: Create winget PR
run: |
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update DoltHub.Dolt -u $Env:URL -v $Env:VERSION -t $Env:TOKEN --submit
env:
TOKEN: ${{ secrets.WINGET_PAT_ACCESS_TOKEN }}
VERSION: ${{ steps.get_version.outputs.version }}
URL: ${{ format('https://github.com/Azure/azqr/releases/download/v{0}/azqr-windows-latest-amd64.exe', steps.get_version.outputs.version) }}

0 comments on commit ea586d6

Please sign in to comment.