Skip to content

bump-chocolatey

bump-chocolatey #344

name: Bump Dolt on Chocolatey
on:
workflow_dispatch:
inputs:
version:
description: 'SemVer format release tag, i.e. 0.24.5'
required: true
force:
description: 'force push package'
required: false
default: 'false'
repository_dispatch:
types: [ bump-chocolatey ]
jobs:
get-version:
name: Get Version
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.get_version.outputs.version }}
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
echo "::set-output name=version::$version"
chocolatey-bump:
needs: get-version
name: Bump Dolt Chocolately
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v2
- name: Chocolately version
run: choco --version
- name: Install AU
run: choco install au
- name: Build Package
working-directory: ./dolt
run: |
if ($env:au_Force -eq 'true') {
$au_Force = $true; ./update.ps1
} else {
./update.ps1
}
cat dolt.nuspec
env:
au_Push: ${{ github.event.inputs.force }}
au_Force: ${{ github.event.inputs.force }}
VERSION: ${{ needs.get-version.outputs.version }}
- name: Test Package Installer
working-directory: ./dolt
run: Test-Package $Install
- name: Dolt Version
run: |
refreshenv
$env:Path += ';C:\Program Files\Dolt\bin\'
dolt version
- name: Push Package to Chocolatey
run: |
if ($env:au_Force -eq 'true') {
$au_Force = $true; Push-Package
} else {
Push-Package
}
working-directory: ./dolt
env:
api_key: ${{ secrets.CHOCO_API_KEY }}
au_Force: ${{ github.event.inputs.force }}
- uses: EndBug/add-and-commit@v7
with:
message: "[ga-bump-dolt-chocolatey] Bumping Dolt on Chocolatey ${{ needs.get-version.outputs.version }}"
add: "."
cwd: "."