-
Notifications
You must be signed in to change notification settings - Fork 59
53 lines (45 loc) · 1.67 KB
/
release.yml
File metadata and controls
53 lines (45 loc) · 1.67 KB
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
name: Release
on:
workflow_dispatch:
jobs:
release:
# This workflow should always be run on main - this is enforced by the
# `release` environment directly but added here for visibility.
# If the workflow fails during publishing, a new release must be published
if: github.ref == 'refs/heads/main' && github.run_attempt == '1'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
steps:
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
id: app-token
with:
app-id: ${{ vars.CLI_APP_ID }}
private-key: ${{ secrets.CLI_APP_PRIVATE_KEY }}
permission-contents: write
owner: planetscale
repositories: |
cli
homebrew-tap
scoop-bucket
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
- name: Configure Git
run: |
git config user.name "planetscale-cli[bot]"
git config user.email "272331943+planetscale-cli[bot]@users.noreply.github.com"
- name: Bump version and push tag
id: bump
run: script/bump-version.sh
- name: Publish artifacts
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GORELEASER_CURRENT_TAG: ${{ steps.bump.outputs.RELEASE_VERSION }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
AUR_KEY: ${{ secrets.AUR_KEY }}
run: script/release.sh