Skip to content

Commit 3dfeb93

Browse files
authored
Merge pull request #236 from replicatedhq/nickm/sc-73526/record-support-ended
record previous release support ended in Pact on new release [sc-73526]
2 parents 7f6dc6f + e939818 commit 3dfeb93

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,29 @@ jobs:
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
5656
- run: make record-release
57+
- name: get previous release sha
58+
id: previous-release
59+
uses: actions/github-script@v6
60+
with:
61+
script: |
62+
const {
63+
data: [latest, previous],
64+
} = await github.rest.repos.listReleases({
65+
...context.repo,
66+
per_page: 2,
67+
page: 1,
68+
});
69+
if (!previous) return;
70+
const {
71+
data: {
72+
object: { sha },
73+
},
74+
} = await github.rest.git.getRef({
75+
...context.repo,
76+
ref: `tags/${previous.tag_name}`,
77+
});
78+
core.setOutput("sha", sha);
79+
- if: steps.previous-release.outputs.sha
80+
env:
81+
PACT_VERSION: ${{ steps.previous-release.outputs.sha }}
82+
run: make record-support-ended

.github/workflows/require-pr-labels.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ record-release:
8181
--environment production \
8282
--verbose
8383

84+
.PHONY: record-support-ended
85+
record-support-ended:
86+
pact-broker record-support-ended \
87+
--pacticipant replicated-cli \
88+
--version ${PACT_VERSION} \
89+
--environment production \
90+
--verbose
91+
8492
# fetch the swagger specs from the production Vendor API
8593
.PHONY: get-spec-prod
8694
get-spec-prod:

0 commit comments

Comments
 (0)