-
-
Notifications
You must be signed in to change notification settings - Fork 65
34 lines (33 loc) · 1.15 KB
/
releases.yml
File metadata and controls
34 lines (33 loc) · 1.15 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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
Release:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- name: Build OpenAPI spec and events
run: nix develop --impure --command just build ${{github.ref_name}}
env:
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
- name: Create Release
run: gh release create ${{github.ref_name}} --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add the OpenAPI file to the release assets
run: |
gh release upload ${{github.ref_name}} ./releases/build/generate.json#openapi.json
gh release upload ${{github.ref_name}} ./events/generated/all.json#events.json
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish OpenAPI to Speakeasy Registry
run: nix develop --impure --command speakeasy run -s all --registry-tags ${{github.ref_name}},LATEST_RELEASE
env:
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}