Skip to content

Build and release mysql.odbc package to Chocolatey #20

Build and release mysql.odbc package to Chocolatey

Build and release mysql.odbc package to Chocolatey #20

Workflow file for this run

name: Build and release mysql.odbc package to Chocolatey
on:
pull_request:
branches:
- master
types:
- closed
workflow_dispatch:
jobs:
pack:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Choco pack
uses: crazy-max/ghaction-chocolatey@v2
with:
args: pack
- name: Save package file name as env var
run: |
chcp 65001 #set code page to utf-8
echo ("PACKAGE_NAME=" + $(Get-ChildItem *.nupkg -Name)) >> $env:GITHUB_ENV
- name: Choco set API key
uses: crazy-max/ghaction-chocolatey@v2
env:
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
with:
args: apikey --key "${{ env.CHOCOLATEY_API_KEY }}" --source https://push.chocolatey.org/
- name: Choco push package
uses: crazy-max/ghaction-chocolatey@v2
with:
args: push "${{ env.PACKAGE_NAME }}" --source https://push.chocolatey.org/
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.PAT }}
tag_prefix: ''
custom_tag: ${{ steps.branch-name.outputs.current_branch }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}