fix: include options.html in release package for v3.0.0 #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'manifest.json' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get version from manifest.json | |
| id: get_version | |
| run: echo "VERSION=$(jq -r '.version' manifest.json)" >> $GITHUB_OUTPUT | |
| - name: Create ZIP package | |
| run: | | |
| mkdir -p package | |
| cp manifest.json background.js content.js options.html package/ | |
| cp -r css js libs icons package/ | |
| cd package | |
| zip -r ../bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip * | |
| - name: Get Release Notes from CHANGELOG.md | |
| id: extract_notes | |
| run: | | |
| NOTES=$(awk '/## \[${{ steps.get_version.outputs.VERSION }}\]/{flag=1; next} /## \[[0-9]+\.[0-9]+\.[0-9]+\]/{flag=0} flag' CHANGELOG.md) | |
| echo "NOTES<<EOF" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.get_version.outputs.VERSION }} | |
| name: BiViNote v${{ steps.get_version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| body: ${{ steps.extract_notes.outputs.NOTES }} | |
| files: bivinote-v${{ steps.get_version.outputs.VERSION }}-chrome.zip |