From d6ec98b1718e344f33ba5dfc68c84dfac6f0996d Mon Sep 17 00:00:00 2001 From: Patrick Daze Date: Mon, 7 Sep 2020 12:54:08 -0400 Subject: [PATCH] Add GitHub action to create release and publish extension --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ manifest.json | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7841417 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: Create Release and Publish + +on: + push: + tags: + - 'v*' + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.2 + - name: Build Extension + uses: TheDoctor0/zip-release@0.4.1 + with: + filename: 'release.zip' + exclusions: '*.git*' + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + - name: Attach Extension to Release + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./release.zip + asset_name: bulma-release.zip + asset_content_type: application/zip + - name: Publish Extension + uses: trmcnvn/chrome-addon@v2 + with: + extension: melacinmggphfalalkhedbcjgdpnohfl + zip: release.zip + client-id: ${{ secrets.CHROME_CLIENT_ID }} + client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} + refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} diff --git a/manifest.json b/manifest.json index 49b79ed..6a823d5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Search for Bulma", - "version": "1.1", + "version": "1.1.1", "description": "Unofficial Chrome extension to search Bulma documentation", "homepage_url": "https://github.com/patrickdaze/bulma-search-chrome", "icons": {