Skip to content

test: run unit tests and integration separatly (#167) #93

test: run unit tests and integration separatly (#167)

test: run unit tests and integration separatly (#167) #93

Workflow file for this run

name: Build and Release
on:
push:
branches: [master]
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Gets release info
id: semantic_release_info
uses: jossef/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
if: ${{ steps.semantic_release_info.outputs.git_tag }}
run: |
yarn
yarn build
env:
BUILD_VERSION: ${{ steps.semantic_release_info.outputs.version }}
- name: Chrome Extension upload & publish.
if: ${{ steps.semantic_release_info.outputs.git_tag }}
uses: MobileFirstLLC/[email protected]
with:
refresh_token: ${{ secrets.CHROME_MARKETPLACE_REFRESH_TOKEN }}
client_id: ${{ secrets.CHROME_MARKETPLACE_CLIENT_ID }}
client_secret: ${{ secrets.CHROME_MARKETPLACE_CLIENT_SECRET }}
zip_file: './dist/chrome_${{ steps.semantic_release_info.outputs.version }}.zip'
extension_id: 'fahpefingaaldhifdbnlipfjniabkiho'
action: 'publish'
- name: Firefox Addon upload & publish
if: ${{ steps.semantic_release_info.outputs.git_tag }}
uses: cardinalby/webext-buildtools-firefox-addons-action@v1
with:
zipFilePath: ./dist/firefox_${{ steps.semantic_release_info.outputs.version }}.xpi
extensionId: '{ce34d01b-8ca1-4b20-abf5-4cf0a329fd66}'
jwtIssuer: ${{ secrets.FF_JWT_ISSUER }}
jwtSecret: ${{ secrets.FF_JWT_SECRET }}
- name: Upload Release Artifacts
id: upload_artifacts
if: ${{ steps.semantic_release_info.outputs.git_tag }}
uses: softprops/[email protected]
with:
tag_name: ${{ steps.semantic_release_info.outputs.git_tag }}
name: ${{ steps.semantic_release_info.outputs.git_tag }}
body: ${{ steps.semantic_release_info.outputs.notes }}
target_commitish: ${{ steps.commit_and_push.outputs.latest_commit_hash }}
files: |
./dist/chrome*.zip
./dist/firefox*.xpi
- name: Notify Discord
if: ${{ steps.semantic_release_info.outputs.git_tag }}
run: |
curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"$msg\"}" ${{ secrets.DISCORD_CHECKMARX_WEBHOOK }}
curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"$msg\"}" ${{ secrets.DISCORD_MAAKAF_WEBHOOK }}
curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"$msg\"}" ${{ secrets.DISCORD_SCAR_WEBHOOK }}
env:
msg: 'Yay! 🎉 \n Version ${{ steps.semantic_release_info.outputs.version }} was released! \n Check it out in: ${{ steps.upload_artifacts.outputs.url }}'