Skip to content

Commit

Permalink
use gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Feb 21, 2021
1 parent db2fabe commit deaf2b6
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 681 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
env:
DIRECTORY: src

# FILE GENERATED WITH: npx ghat fregante/ghatemplates/webext
# SOURCE: https://github.com/fregante/ghatemplates

name: Release
on:
workflow_dispatch: null
schedule:
- cron: 41 12 1 * *
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

This comment has been minimized.

Copy link
@notlmn

notlmn Feb 22, 2021

Hey @hzoo, I'd prefer you use fregante/release-with-changelog here as I recently transferred my repos to @fregante :)

This comment has been minimized.

Copy link
@fregante

fregante Feb 22, 2021

Contributor

I'll update my ghatemplates. Either way that still works

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 --if-present
- name: Update extension’s meta
run: >-
npx dot-json@1 $DIRECTORY/manifest.json version ${{
needs.Version.outputs.version }}
- name: Submit
run: |
case ${{ matrix.command }} in
chrome)
cd $DIRECTORY && npx chrome-webstore-upload-cli@1 upload --auto-publish
;;
firefox)
cd $DIRECTORY && npx web-ext-submit@5
;;
esac
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 }}
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit deaf2b6

Please sign in to comment.