-
Notifications
You must be signed in to change notification settings - Fork 145
70 lines (61 loc) · 1.96 KB
/
pkg-version-bump.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
##
## Bumps the Clarinet version listed on various package managers.
##
name: Package Version Bump
on:
workflow_dispatch:
inputs:
tag:
description: "The tag of the release."
required: true
repository_dispatch:
types:
- released
env:
GIT_USER_NAME: Hiro DevOps
GIT_USER_EMAIL: 45208873+blockstack-devops@users.noreply.github.com
jobs:
homebrew:
name: Homebrew
runs-on: macos-latest
steps:
- name: Homebrew version bump
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_TOKEN }}
TAG: ${{ github.event.client_payload.tag || github.event.inputs.tag }}
run: |
# Get version info
VERSION=$(echo "${TAG#v}")
# Configure git configs
git config --global user.name "${GIT_USER_NAME}"
git config --global user.email "${GIT_USER_EMAIL}"
brew update
brew bump-formula-pr \
--no-browse \
--no-audit \
--force \
--tag "${TAG}" \
--version "${VERSION}" \
${{ github.event.repository.name }}
winget:
name: Winget
runs-on: windows-latest
steps:
- name: Winget version bump
env:
TAG: ${{ github.event.client_payload.tag || github.event.inputs.tag }}
run: |
# Get version info
$VERSION=${env:TAG}.substring(1)
# Configure git configs
git config --global user.name "${env:GIT_USER_NAME}"
git config --global user.email "${env:GIT_USER_EMAIL}"
# Get wingetcreate
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
# Update manifest and submit PR
./wingetcreate.exe update `
--urls https://github.com/${{ github.repository }}/releases/download/${env:TAG}/clarinet-windows-x64.msi `
--version ${VERSION} `
--token ${{ secrets.GH_TOKEN }} `
--submit `
HiroSystems.Clarinet