Skip to content

Commit

Permalink
Merge branch 'main' into link_color_inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
simurai authored Apr 5, 2021
2 parents d45242a + e6da0f1 commit 734ac58
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Label
on:
pull_request:
types: [opened, synchronize, edited]
on: pull_request_target

jobs:
label-release:
name: Release
name: Semantic Version
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ on:
push:
branches:
- 'main'
- '!dependabot/**'
jobs:
release:
name: Final
if: ${{ github.repository == 'primer/css' }}

name: Final
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
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@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ on:

jobs:
release-canary:
name: Canary
if: ${{ github.repository == 'primer/css' }}

name: Canary
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release
on:
push:
branches:
- 'changeset-release/main'

jobs:
release-candidate:
name: Candidate
if: ${{ github.repository == 'primer/css' }}

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.x

- name: Install dependencies
run: yarn

- name: Create .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}

- name: Publish release candidate
run: |
version=$(jq -r .version package.json)
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" package.json )" > package.json
yarn publish --tag next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Output candidate version number
uses: actions/github-script@v3
with:
script: |
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
github.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: 'success',
context: `Published ${package.name}`,
description: package.version,
target_url: `https://unpkg.com/${package.name}@${package.version}/`
})

0 comments on commit 734ac58

Please sign in to comment.