Skip to content

0.13.22

0.13.22 #40

Workflow file for this run

name: Publish Garden release
on:
release:
# The workflow will run once the release has been published (i.e. is not in draft state anymore)
# and it will only run if it is not a pre-release. See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
types: [released]
permissions:
contents: read
jobs:
release-npm:
runs-on: macos-latest
steps:
- name: Set Environment Variables
run: echo "SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-8)" >> "$GITHUB_ENV"
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js 21.x
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: 21.x
- name: Build package
run: |
npm ci
npm run build
- name: Setup npm registry authentication
working-directory: ./core
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish edge version if pre-release
if: github.event.release.prerelease == true
working-directory: ./core
run: |
CURRENT_CORE_VERSION="$(node -e "console.log(require('./package.json').version);")"
npm version "$CURRENT_CORE_VERSION-edge.$SHORT_SHA"
npm publish --tag edge
- name: Publish stable version if normal release
if: github.event.release.prerelease != true
working-directory: ./core
run: |
npm publish
release-homebrew:
uses: ./.github/workflows/reusable-create-homebrew-pr.yml
with:
release-condition: ${{ github.event.release.prerelease != true }}
release-version: ${{ github.event.release.tag_name }}
commit-message: |
This PR has been generated by the publish-release workflow after the new release
@${{ github.triggering_actor }} Please review this PR carefully and merge once Garden should be released to Homebrew.
secrets: inherit