Skip to content

Fix TreeView selection when loader is replaced with content #2990

Fix TreeView selection when loader is replaced with content

Fix TreeView selection when loader is replaced with content #2990

Workflow file for this run

name: Release
on:
push:
release:
types: [published]
permissions:
id-token: write # Required for OIDC
contents: read
checks: write
statuses: write
jobs:
publish-main:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- uses: actions/setup-node@v5
with:
node-version: 20
cache: "npm"
- name: Create .gem credentials
run: |
mkdir -p $HOME/.gem
cat << EOF > $HOME/.gem/credentials
---
:rubygems_api_key: ${RUBYGEMS_TOKEN}
EOF
chmod 0600 $HOME/.gem/credentials
env:
RUBYGEMS_TOKEN: ${{ secrets.RUBYGEMS_TOKEN_SHARED }}
- uses: actions/setup-node@v6
with:
node-version: 24
- name: NPM install
run: |
npm ci
- name: Publish Gem
run: bundle exec rake release
- name: Publish NPM
run: npm publish --access public
release-main:
name: Main
if: ${{ github.repository == 'primer/view_components' && github.ref_name == 'main' && github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install dependencies
run: |
npm ci
bundle install
# Use the primer GitHub App for authentication.
# See: https://github.com/organizations/primer/settings/apps/primer
- name: Get App Token
uses: actions/create-github-app-token@v2
id: get-access-token
with:
app-id: ${{ vars.PRIMER_APP_ID_SHARED }}
owner: primer
private-key: ${{ secrets.PRIMER_APP_PRIVATE_KEY_SHARED }}
- name: Create release pull request or publish to npm
id: changesets
uses: changesets/[email protected]
with:
title: Release Tracking
version: npm run changeset:version
publish: script/changeset-publish
env:
GITHUB_TOKEN: ${{ steps.get-access-token.outputs.token }}
release-canary:
name: Canary
if: ${{ github.repository == 'primer/view_components' && github.ref_name != 'main' && github.ref_name != 'changeset-release/main' && github.event_name == 'push' }}
uses: primer/.github/.github/workflows/[email protected]
with:
install: npm i
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
release-candidate:
name: Candidate
if: ${{ github.repository == 'primer/view_components' && github.ref_name == 'changeset-release/main' && github.event_name == 'push' }}
uses: primer/.github/.github/workflows/[email protected]
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}