Skip to content

Commit

Permalink
Update all
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Dec 9, 2023
1 parent c4f4966 commit 9efe208
Show file tree
Hide file tree
Showing 6 changed files with 9,321 additions and 16,528 deletions.
80 changes: 43 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
env:
DIRECTORY: distribution
PROJECT_NAME: github-issue-link-status

# FILE GENERATED WITH: npx ghat fregante/ghatemplates/webext
# SOURCE: https://github.com/fregante/ghatemplates
Expand All @@ -11,57 +12,62 @@ on:
jobs:
Version:
outputs:
created: ${{ steps.daily-version.outputs.created }}
version: ${{ steps.daily-version.outputs.version }}
created: ${{ env.DAILY_VERSION_CREATED }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
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: fregante/release-with-changelog@v3
if: steps.daily-version.outputs.created
node-version-file: .nvmrc
cache: npm
- run: npm ci
- name: Test and build
run: npm test
- name: Create tag if necessary
uses: fregante/daily-version-action@v2
- name: Update manifest.json with version ${{ env.DAILY_VERSION}}
if: env.DAILY_VERSION_CREATED
run: npx dot-json@1 "$DIRECTORY/manifest.json" version "$DAILY_VERSION"
- name: Ready for "submit" jobs
if: env.DAILY_VERSION_CREATED
uses: actions/upload-artifact@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude: true
path: ${{ env.DIRECTORY }}
- name: Create release
if: env.DAILY_VERSION_CREATED
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{ env.DIRECTORY }}
run: |
FILENAME="$PROJECT_NAME-$DAILY_VERSION-for-local-testing-only.zip"
zip -r "$FILENAME" ./*
gh release create "$DAILY_VERSION" --generate-notes "$FILENAME"
Submit:
needs: Version
if: github.event_name == 'workflow_dispatch' || needs.Version.outputs.created
if: needs.Version.outputs.created
strategy:
fail-fast: false
matrix:
command:
- firefox
- chrome
- Firefox
- Chrome
environment: ${{ matrix.command }}
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@6
;;
esac
- uses: actions/download-artifact@v3
- name: Submit to Mozilla
if: matrix.command == 'Firefox'
working-directory: artifact
run: npx web-ext@7 sign --use-submission-api --channel listed
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- name: Submit to Google
if: matrix.command == 'Chrome'
working-directory: artifact
run: npx chrome-webstore-upload-cli@2 upload --auto-publish
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 }}
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ jobs:
Security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npx lockfile-lint --path package-lock.json --validate-https

Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- run: npm run lint

Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v3
with:
name: github-issue-link-status
path: distribution
Expand Down
Loading

0 comments on commit 9efe208

Please sign in to comment.