chore: add screen recordings in Readme (#12) #8
This file contains 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 | |
# Generate extension builds on push to main | |
on: | |
push: | |
branches: [main] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: write-all | |
jobs: | |
chrome: | |
name: building chrome extension | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- name: checking out repository ⏬ | |
uses: actions/checkout@v3 | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/[email protected] | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Extension | |
run: npm run build | |
- name: Find the upcoming release version from semantic-release | |
id: version | |
run: | | |
npm_config_yes=true npx semantic-release --dry-run | |
echo ::set-output name=version::$(cat .VERSION) | |
rm -f .VERSION | |
- name: log extension version | |
run: echo v${{ steps.version.outputs.version }} | |
- name: Bump up version in package.json and manifest.json | |
if: steps.version.outputs.version | |
run: ./scripts/bump-version.sh ${{ steps.version.outputs.version }} ./package.json ./manifest.json | |
- name: creating oslash-chrome-extension.zip | |
run: zip -r oslash-chrome-extension.zip oslash-chrome-extension | |
- name: upload oslash-chrome-extension.zip to artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: oslash-chrome-extension | |
path: oslash-chrome-extension.zip | |
- name: reset changes for release notes | |
run: git checkout -- . | |
- name: generate release notes | |
run: npm run semantic-release | |
- name: 📎 Attach local flavour of extension ZIP file to GitHub release | |
if: steps.version.outputs.version | |
continue-on-error: true | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: oslash-chrome-extension.zip | |
tag: "@v${{ steps.version.outputs.version }}" | |
overwrite: true |