Skip to content

Commit

Permalink
Fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nadundesilva committed Mar 30, 2022
1 parent cf88e7d commit e447f89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/RELEASE_NOTE
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Check the [Read Me](https://github.com/nadundesilva/k8s-replicator/tree/v0.1.0#h
- `kube-` prefixed namespaces
- Overriding "ignored" or "replicated" behavior of namespaces using labels
- replicator.nadundesilva.github.io/target-namespace=\<ignored | replicated>
- Testing
- E2E tests covering resource creation and deletion
- E2E tests covering namespaces labels
17 changes: 9 additions & 8 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
publish-release:
name: Publish Release
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Generate Version
run: |
Expand All @@ -25,9 +23,12 @@ jobs:
RELEASE_MINOR_VERSION="${MAJOR}.${MINOR}"
RELEASE_PATCH_VERSION="${MAJOR}.${MINOR}.${PATCH}"
echo "RELEASE_MAJOR_VERSION=${RELEASE_MAJOR_VERSION}" >> "${GITHUB_ENV}"
echo "RELEASE_MINOR_VERSION=${RELEASE_MINOR_VERSION}" >> "${GITHUB_ENV}"
echo "RELEASE_PATCH_VERSION=${RELEASE_PATCH_VERSION}" >> "${GITHUB_ENV}"
addEnvVar() {
echo "${1}=${2}" >> "${GITHUB_ENV}"
}
addEnvVar "RELEASE_MAJOR_VERSION" "${RELEASE_MAJOR_VERSION}"
addEnvVar "RELEASE_MINOR_VERSION" "${RELEASE_MINOR_VERSION}"
addEnvVar "RELEASE_PATCH_VERSION" "${RELEASE_PATCH_VERSION}"
echo "Release Major Version: ${RELEASE_MAJOR_VERSION}"
echo "Release Minor Version: ${RELEASE_MINOR_VERSION}"
Expand Down Expand Up @@ -128,12 +129,12 @@ jobs:
git commit -m "[Automated] Preparing for next development iteration"
git checkout -b "release-${RELEASE_PATCH_VERSION}"
git push origin release-${RELEASE_PATCH_VERSION}
git push origin "release-${RELEASE_PATCH_VERSION}"
- name: Create Release Sync Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create --base main \
--assignee "@me" --head "release-${RELEASE_PATCH_VERSION}" \
gh pr create --assignee "${{ github.actor }}" \
--base main --head "release-${RELEASE_PATCH_VERSION}" \
--title "[Automated] Release Sync after ${{ github.ref_name }}" \
--body "Sync changes with master after release ${{ github.ref_name }}"

0 comments on commit e447f89

Please sign in to comment.