-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.19 KB
/
release.yml
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
name: Build & Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
experimental: true
- name: Create Release
uses: google-github-actions/release-please-action@v4
id: release
- name: Build Package
run: |
mise run pull-schema
pkl project package src
- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
TAG=${{ steps.release.outputs.tag_name }}
gh release upload ${{ steps.release.outputs.tag_name }} .out/$TAG/*
gh release edit ${{ steps.release.outputs.tag_name }} -t ${{ steps.release.outputs.tag_name }}
- name: Merge PR
if: ${{ steps.release.outputs.prs_created == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
PR_NUMBER: ${{ steps.release.outputs.pr != null && fromJSON(steps.release.outputs.pr).number }}
run:
gh pr merge -m $PR_NUMBER