GabeDuarteM / semantic-release-chrome

Set of semantic-release plugins for publishing a Chrome extension release
https://www.npmjs.com/package/semantic-release-chrome
MIT License
43 stars 16 forks source link

Question: Do Refresh Tokens Expire? If so, how to handle that? #114

Open Jgordon-pencilwrench opened 5 months ago

Jgordon-pencilwrench commented 5 months ago

A hopefully simple question about the refresh token. If I understand correctly, a refresh token can expire, but can be used to obtain a new refresh token. I'm concerned that when the refresh token expires, the deploy process will fail in my Github Action because the action isn't able to update the refresh token that I'm storing in my repo's secrets. Is this a valid concern? If yes, how should I handle this?

Issue

Your Environment

Github Action

Relevant code or config

name: Release
on:
  push:
    branches:
      - main

permissions:
  contents: read # for checkout
env:
  GOOGLE_CLIENT_ID: ${{secrets.GOOGLE_CLIENT_ID}}
  GOOGLE_CLIENT_SECRET: ${{secrets.GOOGLE_CLIENT_SECRET}}
  GOOGLE_REFRESH_TOKEN: ${{secrets.GOOGLE_REFRESH_TOKEN}}
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    permissions:
      contents: write # to be able to publish a GitHub release
      issues: write # to be able to comment on released issues
      pull-requests: write # to be able to comment on released pull requests
      id-token: write # to enable use of OIDC for npm provenance
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Enable Corepack before setting up Node
        run: corepack enable
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20.x"
          cache: 'yarn'
      - name: Install dependencies
        run: yarn install --immutable
      - run: yarn build
      - run: yarn test
      - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
        run: yarn npm audit
      - name: Release
        run: npx semantic-release