Skip to content

chore(deps): bump actions/checkout from 4 to 7 #331

chore(deps): bump actions/checkout from 4 to 7

chore(deps): bump actions/checkout from 4 to 7 #331

Workflow file for this run

name: Release - Canary
on:
pull_request:
types: [opened, labeled, edited, synchronize]
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
checks:
uses: ./.github/workflows/main.yml
release:
if: contains(github.event.pull_request.labels.*.name, 'canary')
runs-on: ubuntu-latest
needs: [checks]
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v7
- uses: ./.github/setup
- name: Build
run: bun build:packages
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish
run: bun run scripts/canary.ts
- name: Create a new comment notifying of the new canary version
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
// Get package version
const fs = require("fs");
const packageJson = JSON.parse(fs.readFileSync("./packages/core/package.json"));
const version = packageJson.version;
// Create a comment on the PR with the new canary version
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `A new canary is available for testing. You can install these latest builds in your project with:
\`\`\`sh
bun add envin@${version}
bun add @envin/cli@${version}
\`\`\`
`,
})
// Remove the label
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: 'canary',
});