Skip to content

fix release

fix release #15

Workflow file for this run

name: Release and publish on tag
on:
push:
tags:
- '*.*.*'
jobs:
release-firefox:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build
with:
owm-geo-key: ${{ secrets.OWM_GEO }}
owm-current-key: ${{ secrets.OWM_CURRENT }}
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@4db7ff8e9cc8a442ab103fd3ddfaebd0f8f36e4c
- name: Create version metadata
run: |
release='${{ steps.extract-release-notes.outputs.release_notes }}'
cat <<EOF > ./version-metadata.json
{
"version": {
"release_notes": {
"en-US": $(echo "${release//### }" | jq -sR .)
}
}
}
EOF
- uses: actions/upload-artifact@v3
with:
path: ./version-metadata.json
- run: yarn web-ext sign --api-key ${{ secrets.AMO_ISSUER }} --api-secret ${{ secrets.AMO_SECRET }} --use-submission-api --channel=listed --source-dir build/firefox --amo-metadata ./version-metadata.json
- uses: actions/upload-artifact@v3
with:
path: web-ext-artifacts/new_tab_moment-${{ github.ref_name }}.xpi
if-no-files-found: error
outputs:
release_notes: ${{ steps.extract-release-notes.outputs.release_notes }}
release-github:
needs: [release-firefox]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Create Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
tag_name: ${{ github.ref }}
name: ${{ github.ref_name }}
body: ${{ needs.release-firefox.outputs.release_notes }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
files: |
artifact/new_tab_-_moment-${{ github.ref_name }}.*.zip
artifact/new_tab_moment-${{ github.ref_name }}.xpi
release-edge:
needs: [release-firefox]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- uses: wdzeng/edge-addon@b1ce0984067e0a0107065e0af237710906d94531
with:
product-id: ${{ secrets.EDGE_PRODUCT }}
zip-path: artifact/new_tab_-_moment-${{ github.ref_name }}.edge.zip
client-id: ${{ secrets.EDGE_CLIENT }}
client-secret: ${{ secrets.EDGE_SECRET }}
access-token-url: ${{ secrets.EDGE_TOKEN_URL }}