This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
202 additions
and
88 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Release Core-UI | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target_branch: | ||
required: true | ||
type: string | ||
release_core_ui: | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
actions: write | ||
contents: write | ||
|
||
jobs: | ||
initialize: | ||
name: Initialize | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
release_core_ui: ${{ env.release_core_ui }} | ||
target_branch: ${{ env.target_branch }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.target_branch || github.ref_name }} | ||
token: ${{ secrets.KIALI_PROJECT_TOKEN || github.token }} | ||
- name: Configure git | ||
run: | | ||
git config user.email 'kialiProject@gmail.com' | ||
git config user.name 'kialiProject' | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14" | ||
cache: yarn | ||
cache-dependency-path: packages/core-ui/yarn.lock | ||
- name: Get Types package version | ||
working-directory: ./packages/types | ||
run: echo "TYPES_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | ||
- name: Update package core-ui with new types version | ||
working-directory: ./packages/core-ui | ||
run: yarn upgrade @kiali/types@$TYPES_VERSION | ||
- name: Install dependencies and build 🔧 | ||
working-directory: ./packages/core-ui | ||
run: yarn install && yarn build | ||
- name: Major release | ||
if: "${{ github.event.inputs.release_core_ui == 'major' }}" | ||
working-directory: ./packages/core-ui | ||
run: yarn version --major --no-git-tag-version | ||
- name: Minor release | ||
if: "${{ github.event.inputs.release_core_ui == 'minor' }}" | ||
working-directory: ./packages/core-ui | ||
run: yarn version --minor --no-git-tag-version | ||
- name: Patch release | ||
if: "${{ github.event.inputs.release_core_ui == 'patch' }}" | ||
working-directory: ./packages/core-ui | ||
run: yarn version --patch --no-git-tag-version | ||
- name: Get version | ||
working-directory: ./packages/core-ui | ||
run : | | ||
echo "NEW_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | ||
- name: Publish package 📦 | ||
working-directory: ./packages/core-ui | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm publish --no-verify-access | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Push changes to repository | ||
working-directory: ./packages/core-ui | ||
run: | | ||
git add "package.json" | ||
git commit -m "chore: release ${{ env.NEW_VERSION }}" | ||
git tag ${{ env.NEW_VERSION }} | ||
git push origin && git push --tags |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release Types | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target_branch: | ||
required: true | ||
type: string | ||
release_types: | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
actions: write | ||
contents: write | ||
|
||
jobs: | ||
initialize: | ||
name: Initialize | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
release_types: ${{ env.release_types }} | ||
target_branch: ${{ env.target_branch }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.target_branch || github.ref_name }} | ||
token: ${{ secrets.KIALI_PROJECT_TOKEN || github.token }} | ||
- name: Configure git | ||
run: | | ||
git config user.email 'kialiProject@gmail.com' | ||
git config user.name 'kialiProject' | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14" | ||
cache: yarn | ||
cache-dependency-path: packages/types/yarn.lock | ||
- name: Install dependencies and build 🔧 | ||
working-directory: ./packages/types | ||
run: yarn install && yarn build | ||
- name: Major release | ||
if: "${{ github.event.inputs.release_types == 'major' }}" | ||
working-directory: ./packages/types | ||
run: yarn version --major --no-git-tag-version | ||
- name: Minor release | ||
if: "${{ github.event.inputs.release_types == 'minor' }}" | ||
working-directory: ./packages/types | ||
run: yarn version --minor --no-git-tag-version | ||
- name: Patch release | ||
if: "${{ github.event.inputs.release_types == 'patch' }}" | ||
working-directory: ./packages/types | ||
run: yarn version --patch --no-git-tag-version | ||
- name: Get version | ||
working-directory: ./packages/types | ||
run : | | ||
echo "NEW_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | ||
- name: Publish package 📦 | ||
working-directory: ./packages/types | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm publish --no-verify-access | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Push changes to repository | ||
working-directory: ./packages/types | ||
run: | | ||
git add "package.json" | ||
git commit -m "chore: release Types package to version ${{ env.NEW_VERSION }}" | ||
git tag ${{ env.NEW_VERSION }} | ||
git push origin && git push --tags |
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
This file was deleted.
Oops, something went wrong.
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
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