0.13.14 #29
Workflow file for this run
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: 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@3df4ab11eba7bda6032a0b82a6bb43b11571feac | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d | |
with: | |
node-version: 18.x | |
- name: Build package | |
run: | | |
yarn | |
yarn 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 |