remove web input TODO implemented #103
Workflow file for this run
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: Release and publish on tag | |
on: | |
push: | |
tags: | |
- 'v*.*.*-extension' | |
workflow_dispatch: | |
jobs: | |
build-release-publish: | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: './.github/workflows/constants.env' | |
expand: true | |
- name: Look for an existing release | |
id: getRelease | |
uses: cardinalby/git-get-release-action@v1 | |
continue-on-error: true | |
with: | |
tag: ${{ github.ref_name }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Build, test and pack to zip | |
id: buildPack | |
env: | |
API_URL: ${{ secrets.API_URL }} | |
PAGE_URL: ${{ secrets.PAGE_URL }} | |
if: steps.getRelease.outcome != 'success' | |
uses: ./.github/workflows/actions/build-test-pack | |
- name: Create Release | |
id: createRelease | |
if: steps.getRelease.outcome != 'success' | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: 'true' | |
- name: Upload zip asset to the release | |
if: steps.getRelease.outcome != 'success' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.createRelease.outputs.upload_url }} | |
asset_path: ${{ env.ZIP_FILE_PATH }} | |
asset_name: ${{ env.ZIP_FILE_NAME }} | |
asset_content_type: application/zip | |
# Should trigger build-assets-on-release.yml | |
- name: Publish release | |
if: steps.getRelease.outcome != 'success' | |
uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.WORKFLOWS_TOKEN }} | |
with: | |
release_id: ${{ steps.createRelease.outputs.id }} | |
- name: Publish on Chrome Webstore | |
uses: benc-uk/workflow-dispatch@v1 | |
if: "!contains(github.event.head_commit.message, '[skip chrome]')" | |
with: | |
workflow: publish-on-chrome-webstore | |
token: ${{ secrets.WORKFLOWS_TOKEN }} | |
wait-for-completion: false | |
- name: Publish on Edge Add-ons | |
uses: benc-uk/workflow-dispatch@v1 | |
if: "!contains(github.event.head_commit.message, '[skip edge]')" | |
with: | |
workflow: publish-on-edge-add-ons | |
token: ${{ secrets.WORKFLOWS_TOKEN }} | |
wait-for-completion: false | |
- name: Create Web extension Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: authier-ml | |
SENTRY_PROJECT: web-extension | |
with: | |
environment: production |