Skip to content

Commit

Permalink
ci: add release arifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Dec 26, 2024
1 parent 63477dc commit 6ecc325
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,42 @@ jobs:
# Push the newly bumped version back to the repo
run: git push origin HEAD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build plugin
run: pnpm --filter "./packages/plugin" build

- name: Prepare release artifacts
run: |
mkdir -p release-artifacts
cp packages/plugin/dist/main.js release-artifacts/
cp packages/plugin/dist/styles.css release-artifacts/
cp packages/plugin/manifest.json release-artifacts/
# Create checksum file
cd release-artifacts
sha256sum * > checksums.txt
cd ..
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version=$(node -p "require('./packages/plugin/manifest.json').version")
# Create release notes
echo "## Changes in this release" > release-notes.md
echo "Version bump: ${{ github.event.inputs.increment }}" >> release-notes.md
echo "" >> release-notes.md
echo "### SHA-256 Checksums" >> release-notes.md
cat release-artifacts/checksums.txt >> release-notes.md
# Create the release
gh release create "$version" \
--title="Version $version" \
--notes-file=release-notes.md \
--draft=false \
release-artifacts/main.js \
release-artifacts/styles.css \
release-artifacts/manifest.json \
release-artifacts/checksums.txt

0 comments on commit 6ecc325

Please sign in to comment.