Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .github/workflows/deployment.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
env: {}

# DO NOT EDIT BELOW, USE: npx ghat fregante/ghatemplates/webext --set 'on.schedule=[{"cron": "21 12 * * 3"}]'

name: Release
on:
workflow_dispatch: null
schedule:
- cron: 21 12 * * 3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change: this was set to run every day. Now it's once a week

jobs:
Version:
outputs:
created: '${{ steps.daily-version.outputs.created }}'
version: '${{ steps.daily-version.outputs.version }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 20
- name: install
run: npm ci || npm install
- run: npm test
- uses: fregante/daily-version-action@v1
name: Create tag if necessary
id: daily-version
- uses: notlmn/release-with-changelog@v3
if: steps.daily-version.outputs.created
with:
token: '${{ secrets.GITHUB_TOKEN }}'
exclude: true
Submit:
needs: Version
if: github.event_name == 'workflow_dispatch' || needs.Version.outputs.created
strategy:
fail-fast: false
matrix:
command:
- firefox
- chrome
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install
run: npm ci || npm install
- run: npm run build
- name: Update extension’s meta
run: >-
npx dot-json distribution/manifest.json version ${{
needs.Version.outputs.version }}
- run: 'npm run release:${{ matrix.command }}'
env:
EXTENSION_ID: '${{ secrets.EXTENSION_ID }}'
CLIENT_ID: '${{ secrets.CLIENT_ID }}'
CLIENT_SECRET: '${{ secrets.CLIENT_SECRET }}'
REFRESH_TOKEN: '${{ secrets.REFRESH_TOKEN }}'
WEB_EXT_API_KEY: '${{ secrets.WEB_EXT_API_KEY }}'
WEB_EXT_API_SECRET: '${{ secrets.WEB_EXT_API_SECRET }}'
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"test:js": "ava",
"build": "webpack --mode=production",
"watch": "webpack --mode=development --watch",
"version": "dot-json distribution/manifest.json version $VER",
"release:cws": "webstore upload --source=distribution --auto-publish",
"release:amo": "web-ext-submit --source-dir distribution",
"release": "VER=$(daily-version) run-s build version release:*"
"release:firefox": "cd distribution && webstore upload --auto-publish",
"release:chrome": "cd distribution && web-ext-submit"
},
"dependencies": {
"delay": "^4.3.0",
Expand Down