Publishing packages workflow and deploying to Deno Deploy step runs even for forks. This is annoying, since it creates some spam every push for any open PR's. This PR tries to address this, by skipping certain steps or workflows unless the current GitHub org is `denoland`, which should be pretty safe long term. ## Failed workflow spam <img width="1396" height="635" alt="image" src="https://github.com/user-attachments/assets/d939d1f5-e736-42a4-9355-f946b3d6ddf2" /> <img width="1577" height="905" alt="image" src="https://github.com/user-attachments/assets/fbf7ffe3-2759-430a-a33e-c8de0d7e113c" />
48 lines
993 B
YAML
48 lines
993 B
YAML
name: Publish JSR
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
# Skip publishing for forks
|
|
if: github.repository_owner == 'denoland'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Deno
|
|
uses: denoland/setup-deno@v2
|
|
with:
|
|
cache: true
|
|
|
|
- name: Publish Fresh
|
|
run: deno publish
|
|
|
|
- name: Publish @fresh/init
|
|
working-directory: ./init
|
|
run: deno publish
|
|
|
|
- name: Publish @fresh/plugin-tailwindcss
|
|
working-directory: ./plugin-tailwindcss
|
|
run: deno publish
|
|
|
|
- name: Publish @fresh/plugin-tailwindcss-v3
|
|
working-directory: ./plugin-tailwindcss-v3
|
|
run: deno publish
|
|
|
|
- name: Publish @fresh/update
|
|
working-directory: ./update
|
|
run: deno publish
|
|
|
|
- name: Publish @fresh/examples
|
|
working-directory: ./examples
|
|
run: deno publish
|