Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Meta: Use GitHub Actions for automatic deployment #100

Merged
merged 7 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 5 additions & 6 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ on:
# You can manually trigger a deployment on GitHub.com
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
schedule:
- cron: '31 13 * * 3'
- cron: '42 4 * * 4' # At 04:42 every Thursday

jobs:
Build:
outputs:
created: ${{ steps.daily-version.outputs.created }}
shouldDeploy: ${{ steps.daily-version.outputs.created }} || github.event_name == 'workflow_dispatch'
notlmn marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 20
- run: npm install
- run: npm test # This includes the build
- run: npm ci
notlmn marked this conversation as resolved.
Show resolved Hide resolved
- uses: fregante/daily-version-action@v1
name: Create tag if necessary
id: daily-version
Expand All @@ -39,7 +38,7 @@ jobs:

Chrome:
needs: Build
if: github.event_name == 'workflow_dispatch' || needs.Build.outputs.created
if: needs.Build.outputs.shouldDeploy
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
Expand All @@ -52,7 +51,7 @@ jobs:

Firefox:
needs: Build
if: github.event_name == 'workflow_dispatch' || needs.Build.outputs.created
if: needs.Build.outputs.shouldDeploy
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"watch": "webpack --mode=development --watch",
"release:amo": "cd distribution && web-ext-submit",
"release:cws": "cd distribution && webstore upload --auto-publish",
"release": "run-s build update-version release:*",
"update-version": "dot-json distribution/manifest.json version $TRAVIS_TAG"
"release": "VER=$(daily-version) run-s build version release:*",
"version": "dot-json distribution/manifest.json version $VER"
},
"dependencies": {
"dom-chef": "^4.1.0",
Expand All @@ -26,6 +26,7 @@
"@types/terser-webpack-plugin": "^4.0.0",
"chrome-webstore-upload-cli": "^1.2.0",
"copy-webpack-plugin": "^6.0.3",
"daily-version": "^2.0.0",
"dot-json": "^1.2.0",
"eslint-config-xo-react": "^0.23.0",
"eslint-plugin-react": "^7.20.5",
Expand Down