Skip to content

Commit

Permalink
feat(ci): test draft-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lc525 committed Oct 3, 2024
1 parent f287541 commit b00677c
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ jobs:
git add k8s/helm-charts && git commit -m "Setting version for helm charts" || echo "Nothing to commit"
git add k8s/yaml && git commit -m "Setting version for yaml manifests" || echo "Nothing to commit"
- name: Prepare artifacts
run: |
make prep-artifacts
# - name: Prepare artifacts
# run: |
# make prep-artifacts

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: .release/
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: artifacts
# path: .release/

- name: Install auto-changelog tool
run: |
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
git add -A && git commit --amend --no-edit || echo "Nothing to commit"
# Revert GitBook URL tags to point back to the files in the v2 branch for commits
# after the release tag
git revert HEAD --no-commit && git commit --amend -m "Restore docs-gitbook code references for updates after ${RELEASE_TAG}" || echo "Nothing to commit"
git revert HEAD~1 --no-commit && git commit --amend -m "Restore docs-gitbook code references for updates after ${RELEASE_TAG}" || echo "Nothing to commit"
fi
- name: Generate release-notes.txt
Expand All @@ -141,23 +141,23 @@ jobs:
auto-changelog -l 5 --starting-version ${RELEASE_TAG} --ending-version ${RELEASE_TAG} -o release-notes.txt
fi
- name: Upload release notes
uses: actions/upload-artifact@v3
with:
name: release-notes
path: release-notes.txt
# - name: Upload release notes
# uses: actions/upload-artifact@v3
# with:
# name: release-notes
# path: release-notes.txt

- name: Push new commits to repository
run: git push

- name: Create or edit release draft
run: |
# TODO: Valdiate that there is no published released (we should not get here if tag exists anyway)
gh release delete "${RELEASE_TAG}" --yes || echo "Draft does not yet exist"
gh release create "${RELEASE_TAG}" --draft \
--title "${RELEASE_TAG}" \
--notes-file release-notes.txt \
--target "${RELEASE_BRANCH}" \
.release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create or edit release draft
# run: |
# # TODO: Valdiate that there is no published released (we should not get here if tag exists anyway)
# gh release delete "${RELEASE_TAG}" --yes || echo "Draft does not yet exist"
# gh release create "${RELEASE_TAG}" --draft \
# --title "${RELEASE_TAG}" \
# --notes-file release-notes.txt \
# --target "${RELEASE_BRANCH}" \
# .release/*
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b00677c

Please sign in to comment.