-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 1.56 KB
/
release.yml
File metadata and controls
55 lines (48 loc) · 1.56 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
54
55
name: Release OpenAPI spec
on:
repository_dispatch:
workflow_dispatch:
inputs:
releaseVersion:
required: true
type: string
description: The version to be released
env:
GIT_AUTHOR_NAME: localstack[bot]
GIT_AUTHOR_EMAIL: localstack-bot@users.noreply.github.com
GIT_COMMITTER_NAME: localstack[bot]
GIT_COMMITTER_EMAIL: localstack-bot@users.noreply.github.com
jobs:
release-localstack-openapi:
runs-on: ubuntu-latest
env:
release: ${{ github.event_name == 'workflow_dispatch' && inputs.releaseVersion || github.event.client_payload.releaseVersion}}
steps:
- name: Checkout OpenAPI
uses: actions/checkout@v4
- name: Generate Spec
uses: ./.github/actions/generate-spec
with:
pro-ref: v${{ env.release }}
pro-token: ${{ secrets.PRO_GITHUB_TOKEN }}
- name: Commit Release Version
env:
DEPENDENCY_FILE: "openapi/"
RELEASE_VERSION: ${{ env.release }}
run: |
git add "${DEPENDENCY_FILE}"
git commit --allow-empty -m "Release: v${RELEASE_VERSION}"
git tag -a "v${RELEASE_VERSION}" -m "Release: v${RELEASE_VERSION}"
git push --follow-tags
- name: Show Git Modifications
run: |
git log --oneline -n 2
git show HEAD
- name: Release
uses: softprops/action-gh-release@v2
with:
name: v${{ env.release }}
files: |
openapi/emulators/localstack-spec.yml
tag_name: v${{ env.release }}
draft: true