Skip to content

Commit

Permalink
add record support ended, add record release to staging (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
e3b0c442 authored Aug 10, 2023
1 parent f475a4c commit 81734b2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,23 @@ jobs:
- name: Pact record-release
run: make record-release

- name: get previous release tag
id: previous-release
uses: actions/github-script@v6
with:
script: |
const {
data: [latest, previous],
} = await github.rest.repos.listReleases({
...context.repo,
per_page: 2,
page: 1,
});
if (!previous) return;
core.setOutput("sha", previous.tag_name);
- if: steps.previous-release.outputs.sha
env:
PACT_VERSION: ${{ steps.previous-release.outputs.sha }}
run: make record-support-ended
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ can-i-deploy:
.PHONY: record-release
record-release:
pact-broker record-release \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment staging \
--verbose
pact-broker record-release \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment production \
--verbose

.PHONY: record-support-ended
record-support-ended:
pact-broker record-support-ended \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment staging \
--verbose
pact-broker record-support-ended \
--pacticipant replicated-sdk \
--version ${PACT_VERSION} \
--environment production \
Expand Down

0 comments on commit 81734b2

Please sign in to comment.