Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Feb 12, 2025
1 parent be5964c commit 36469ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 50 deletions.
51 changes: 4 additions & 47 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,48 +51,6 @@ jobs:
if: inputs.skip_checks != true
run: |
make release-snapshot
check-changelog:
needs:
- check-branch
runs-on: ubuntu-22.04
steps:

- name: Checkout code
if: inputs.skip_checks != true
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get latest commit SHA of Develop & Current Branch
if: inputs.skip_checks != true
id: get-develop-sha
run: |
SHA=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/git/ref/heads/develop | jq -r '.object.sha')
echo "DEVELOP_SHA=${SHA}" >> ${GITHUB_ENV}
echo "CURRENT_BRANCH_SHA=${{ github.sha }}" >> ${GITHUB_ENV}
- name: Check for CHANGELOG.md changes
if: inputs.skip_checks != true
run: |
echo "Check the changelog has actually been updated from whats in develop"
echo "DEVELOP BRANCH SHA: ${DEVELOP_SHA}"
echo "CURRENT BRANCH SHA: ${CURRENT_BRANCH_SHA}"
CHANGELOG_DIFF=$(git diff ${DEVELOP_SHA}..${CURRENT_BRANCH_SHA} -- changelog.md)
echo "${CHANGELOG_DIFF}"
if [ -z "$CHANGELOG_DIFF" ]; then
echo "ERROR: No changes detected in CHANGELOG.md. Please update the changelog."
exit 1
else
echo "CHANGELOG.md has been updated."
fi
- name: Mark Job Complete Skipped
if: inputs.skip_checks == true
shell: bash
run: |
echo "continue"
publish-release:
permissions:
Expand All @@ -101,7 +59,6 @@ jobs:
attestations: write
if: inputs.skip_release != true
needs:
- check-changelog
- check-branch
- check-goreleaser
runs-on: ${{ vars.RELEASE_RUNNER }}
Expand All @@ -113,8 +70,8 @@ jobs:
- name: Change Log Release Notes.
id: release_notes
run: |
cat changelog.md > ${{ github.workspace }}-CHANGELOG.txt
cat ${{ github.workspace }}-CHANGELOG.txt
awk '/^## /{flag++} flag==1{print}' changelog.md > changelog-current.md
cat changelog-current.md
- name: Set Version
run: |
Expand All @@ -137,11 +94,11 @@ jobs:
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.2.0
with:
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
body_path: changelog-current.md
tag_name: ${{ env.GITHUB_TAG_MAJOR_VERSION }}

- name: Publish Release Files
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish-typescript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ jobs:
- name: Generate
run: |
make typescript
make typescript
- name: Set Version
working-directory: typescript
run: |
version=$(cat ../app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"')
npm version ${version}
npm version from-git
- name: Publish package on NPM 📦
run: npm publish
Expand Down

0 comments on commit 36469ca

Please sign in to comment.