Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: patternfly-labs/pf-react-release-playground
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @patternfly-labs/[email protected]
Choose a base ref
...
head repository: patternfly-labs/pf-react-release-playground
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
27 changes: 27 additions & 0 deletions .github/promote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
GIT_USERNAME="patternfly-build"
GH_REPO=${GITHUB_REPOSITORY}
REPO="github.com/${GH_REPO}"
echo "Preparing release environment..."
git config user.email "patternfly-build@redhat.com"
git config user.name ${GIT_USERNAME}
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

# Lerna is complicated. Commands: https://github.com/lerna/lerna/tree/master/commands
# Identify packages that have been updated since the previous tagged release
# Update their versions and changelogs according to angular commit guidelines
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit

if [[ ! -z "${CORE_VERSION}" ]]; then
echo "updating to @patternfly/patternfly: ${CORE_VERSION}"
npm pkg set dependencies.@patternfly/patternfly=${CORE_VERSION} --workspace @patternfly-labs/footer --workspace @patternfly-labs/header --workspace @patternfly-labs/sub-footer
fi

# publish to github and npm
yarn run lerna publish --conventional-commits --conventional-graduate --no-private --dist-tag=latest --yes

# dry run
# yarn run lerna version --conventional-commits --conventional-graduate --no-private --yes --no-git-tag-version --no-push

# immediately after promote - set up repo for next prerelease
yarn run lerna version preminor --force-publish --conventional-commits --no-private --yes --preid prerelease
6 changes: 5 additions & 1 deletion .github/release.sh
Original file line number Diff line number Diff line change
@@ -13,4 +13,8 @@ echo "Doing a release..."
# Update their versions and changelogs according to angular commit guidelines
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit

yarn run lerna publish --conventional-commits --create-release=github --no-verify-access --yes
# publish to github and npm
yarn run lerna publish prerelease --conventional-commits --conventional-prerelease --preid=prerelease --no-private --dist-tag=prerelease --yes

# dry run
# yarn run lerna version prerelease --conventional-commits --conventional-prerelease --no-private --yes --no-git-tag-version --no-push
27 changes: 27 additions & 0 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: promote
on:
workflow_dispatch:
inputs:
core-version:
description: 'The PatternFly core version'
required: false
jobs:
deploy:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_SECRET }}
CORE_VERSION: ${{ github.event.inputs.core-version }}
GH_TOKEN: ${{ secrets.DG_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.DG_GITHUB_TOKEN }} # needs to be an admin token to get around branch protection
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install deps
run: yarn install --frozen-lockfile
- name: Build dist
run: yarn build
- name: Deploy to NPM and Github
run: .github/promote.sh
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -12,13 +12,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
with:
fetch-depth: "0"
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install deps
run: yarn install
run: yarn install --frozen-lockfile
- name: Build dist
run: yarn build
- name: Deploy to NPM and Github
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ Used for testing the pf-react build and release workflows

Uses lerna's getting started seed app.

`npm install && npm run build`
`npm install && npm run build`
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -12,5 +12,6 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"allowBranch": ["main", "v1"]
}
Loading