Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies after 2 years #71

Merged
merged 5 commits into from
Dec 9, 2023
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
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@v4
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: package.json
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
Loading