Set fetch depth for actions/checkout #603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
# check out full history | |
fetch-depth: 0 | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: yarn | |
- name: Run CI | |
run: yarn ci | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
id: changesets | |
with: | |
version: yarn run version | |
publish: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Zip dist | |
if: steps.changesets.outputs.published == 'true' | |
run: | | |
cd packages/chrome-extension | |
zip dist.zip -r dist | |
- name: Edit release | |
if: steps.changesets.outputs.published == 'true' | |
uses: xresloader/upload-to-github-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file: "packages/chrome-extension/dist.zip" | |
update_latest_release: true |