-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from department-of-veterans-affairs/feature/70…
…53-narin-automate-changelog [Feature] Automate changelog generation for non-alpha/beta releases
- Loading branch information
Showing
9 changed files
with
311 additions
and
219 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
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,38 @@ | ||
#!/bin/bash | ||
# This script creates a regex string based on the passed package | ||
# in order to generate a changelog that filters out the other | ||
# packages in this monorepo. | ||
|
||
# Check if 'packages', 'current_package' and 'token' are provided as command line arguments | ||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <current_package> <token>" | ||
exit 1 | ||
fi | ||
|
||
# Assign command line arguments to variables | ||
current_package="$1" | ||
token="$2" | ||
|
||
# Get list of packages based on directories in packages/ | ||
packages=(../../packages/*/) | ||
packages=("${packages[@]%/}") | ||
packages=("${packages[@]##*/}") | ||
|
||
# Filter out current package | ||
filtered_array=() | ||
for value in "${packages[@]}" | ||
do | ||
[[ $value != $current_package ]] && filtered_array+=($value) | ||
done | ||
|
||
# Add regex to each item in array | ||
filtered_array=( "${filtered_array[@]/%/-.*}" ) | ||
|
||
# Join strings with pipe char | ||
joined_string=$(IFS="|"; echo "${filtered_array[*]}") | ||
|
||
# Build full regex string | ||
regex="(.*-(alpha|beta).*|$joined_string)" | ||
echo "Regex: $regex" | ||
|
||
bundle exec github_changelog_generator -u department-of-veterans-affairs -p va-mobile-library -t $token --exclude-tags-regex $regex --no-unreleased |
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 |
---|---|---|
|
@@ -32,17 +32,26 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }} | ||
steps: | ||
- name: 'Checkout repo' | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }} | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2' | ||
bundler-cache: true | ||
working-directory: ${{ github.workspace }} | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
node-version-file: '.nvmrc' | ||
- run: yarn install | ||
cache: yarn | ||
- run: | | ||
yarn install | ||
cd ../../ | ||
yarn install | ||
- name: Bump version and publish to NPM | ||
id: bump-version | ||
run: | | ||
|
@@ -76,12 +85,17 @@ jobs: | |
echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT" | ||
echo "GIT_TAG=${{ inputs.package }}-v$NEW_VERSION" >> "$GITHUB_OUTPUT" | ||
- name: Commit package.json changes and tag | ||
- name: Generate changelog | ||
run: | | ||
chmod +x ../../.github/scripts/generate-changelog.sh | ||
./../../.github/scripts/generate-changelog.sh ${{ inputs.package }} ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }} | ||
- name: Commit changes and tag | ||
run: | | ||
git config --global user.name 'VA Automation Bot' | ||
git config --global user.email '[email protected]' | ||
git pull | ||
git add package.json | ||
git add CHANGELOG.md | ||
git commit -m 'Version bump: ${{ steps.bump-version.outputs.GIT_TAG }}' | ||
git push | ||
TAG=${{ steps.bump-version.outputs.GIT_TAG }} | ||
|
@@ -131,7 +145,3 @@ jobs: | |
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_OAUTH_TOKEN }} | ||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 | ||
timeout-minutes: 15 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "github_changelog_generator" |
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,99 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activesupport (7.1.2) | ||
base64 | ||
bigdecimal | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
connection_pool (>= 2.2.5) | ||
drb | ||
i18n (>= 1.6, < 2) | ||
minitest (>= 5.1) | ||
mutex_m | ||
tzinfo (~> 2.0) | ||
addressable (2.8.5) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
async (2.6.5) | ||
console (~> 1.10) | ||
fiber-annotation | ||
io-event (~> 1.1) | ||
timers (~> 4.1) | ||
async-http (0.61.0) | ||
async (>= 1.25) | ||
async-io (>= 1.28) | ||
async-pool (>= 0.2) | ||
protocol-http (~> 0.25.0) | ||
protocol-http1 (~> 0.16.0) | ||
protocol-http2 (~> 0.15.0) | ||
traces (>= 0.10.0) | ||
async-http-faraday (0.12.0) | ||
async-http (~> 0.42) | ||
faraday | ||
async-io (1.38.0) | ||
async | ||
async-pool (0.4.0) | ||
async (>= 1.25) | ||
base64 (0.2.0) | ||
bigdecimal (3.1.4) | ||
concurrent-ruby (1.2.2) | ||
connection_pool (2.4.1) | ||
console (1.23.2) | ||
fiber-annotation | ||
fiber-local | ||
drb (2.2.0) | ||
ruby2_keywords | ||
faraday (2.7.12) | ||
base64 | ||
faraday-net_http (>= 2.0, < 3.1) | ||
ruby2_keywords (>= 0.0.4) | ||
faraday-http-cache (2.5.0) | ||
faraday (>= 0.8) | ||
faraday-net_http (3.0.2) | ||
fiber-annotation (0.2.0) | ||
fiber-local (1.0.0) | ||
github_changelog_generator (1.16.4) | ||
activesupport | ||
async (>= 1.25.0) | ||
async-http-faraday | ||
faraday-http-cache | ||
multi_json | ||
octokit (~> 4.6) | ||
rainbow (>= 2.2.1) | ||
rake (>= 10.0) | ||
i18n (1.14.1) | ||
concurrent-ruby (~> 1.0) | ||
io-event (1.3.3) | ||
minitest (5.20.0) | ||
multi_json (1.15.0) | ||
mutex_m (0.2.0) | ||
octokit (4.25.1) | ||
faraday (>= 1, < 3) | ||
sawyer (~> 0.9) | ||
protocol-hpack (1.4.2) | ||
protocol-http (0.25.0) | ||
protocol-http1 (0.16.0) | ||
protocol-http (~> 0.22) | ||
protocol-http2 (0.15.1) | ||
protocol-hpack (~> 1.4) | ||
protocol-http (~> 0.18) | ||
public_suffix (5.0.4) | ||
rainbow (3.1.1) | ||
rake (13.1.0) | ||
ruby2_keywords (0.0.5) | ||
sawyer (0.9.2) | ||
addressable (>= 2.3.5) | ||
faraday (>= 0.17.3, < 3) | ||
timers (4.3.5) | ||
traces (0.11.1) | ||
tzinfo (2.0.6) | ||
concurrent-ruby (~> 1.0) | ||
|
||
PLATFORMS | ||
arm64-darwin-22 | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
github_changelog_generator | ||
|
||
BUNDLED WITH | ||
2.4.22 |
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,84 @@ | ||
# Changelog | ||
|
||
## [components-v0.2.1](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.2.1) (2023-11-22) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.2.0...components-v0.2.1) | ||
|
||
**Merged pull requests:** | ||
|
||
- feature/6860-roettger-DesignTokensForFigma [\#35](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/35) ([TimRoe](https://github.com/TimRoe)) | ||
- feature/6870-nr-vabutton [\#34](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/34) ([narin](https://github.com/narin)) | ||
|
||
## [components-v0.2.0](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.2.0) (2023-11-16) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.31...components-v0.2.0) | ||
|
||
**Merged pull requests:** | ||
|
||
- CU/6700-roettger-MobileLibraryPRTemplate [\#33](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/33) ([TimRoe](https://github.com/TimRoe)) | ||
- 6857-roettger-FixRNWebDeprecatedAttribsOnSegmentedControl [\#32](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/32) ([TimRoe](https://github.com/TimRoe)) | ||
- 6989-roettger storybook missing dist folder locally [\#31](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/31) ([TimRoe](https://github.com/TimRoe)) | ||
- Bump browserify-sign from 4.2.1 to 4.2.2 [\#30](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/30) ([dependabot[bot]](https://github.com/apps/dependabot)) | ||
- Bump browserify-sign from 4.2.1 to 4.2.2 in /packages/components [\#29](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/29) ([dependabot[bot]](https://github.com/apps/dependabot)) | ||
- GHA Release Workflow [\#28](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/28) ([narin](https://github.com/narin)) | ||
- Bump @babel/traverse from 7.22.8 to 7.23.2 [\#27](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/27) ([dependabot[bot]](https://github.com/apps/dependabot)) | ||
|
||
## [components-v0.0.31](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.31) (2023-10-27) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.30...components-v0.0.31) | ||
|
||
## [components-v0.0.30](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.30) (2023-10-26) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.29...components-v0.0.30) | ||
|
||
## [components-v0.0.29](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.29) (2023-10-26) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.28...components-v0.0.29) | ||
|
||
## [components-v0.0.28](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.28) (2023-10-26) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.27...components-v0.0.28) | ||
|
||
## [components-v0.0.27](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.27) (2023-10-26) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/components-v0.0.26...components-v0.0.27) | ||
|
||
## [components-v0.0.26](https://github.com/department-of-veterans-affairs/va-mobile-library/tree/components-v0.0.26) (2023-10-25) | ||
|
||
[Full Changelog](https://github.com/department-of-veterans-affairs/va-mobile-library/compare/bfe7f18051ff4723b5e7085061f9b2749690d10d...components-v0.0.26) | ||
|
||
**Closed issues:** | ||
|
||
- Error: GitHub Repository Not Mapped To eMASS System [\#5](https://github.com/department-of-veterans-affairs/va-mobile-library/issues/5) | ||
- Error: GitHub Repository Not Mapped To eMASS System [\#4](https://github.com/department-of-veterans-affairs/va-mobile-library/issues/4) | ||
|
||
**Merged pull requests:** | ||
|
||
- Bump @babel/traverse from 7.22.8 to 7.23.2 in /packages/components [\#26](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/26) ([dependabot[bot]](https://github.com/apps/dependabot)) | ||
- 6826 roettger segmented control storybook updates [\#25](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/25) ([TimRoe](https://github.com/TimRoe)) | ||
- Added CI check to require checkboxes be complete [\#24](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/24) ([timwright12](https://github.com/timwright12)) | ||
- Fix Storybook on Android [\#23](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/23) ([narin](https://github.com/narin)) | ||
- 6507 roettger add segmented control unit tests [\#22](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/22) ([TimRoe](https://github.com/TimRoe)) | ||
- Chore/6692 add nvm [\#21](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/21) ([timwright12](https://github.com/timwright12)) | ||
- Adding workflow to run checks against the VA Mobile App [\#20](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/20) ([timwright12](https://github.com/timwright12)) | ||
- Add testIDs prop to SegmentedControl [\#19](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/19) ([narin](https://github.com/narin)) | ||
- Add style-dictionary and generate initial tokens [\#18](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/18) ([narin](https://github.com/narin)) | ||
- Fix Storybook web [\#17](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/17) ([narin](https://github.com/narin)) | ||
- Updated repo name assets [\#16](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/16) ([timwright12](https://github.com/timwright12)) | ||
- Adding Storybook publishing workflow [\#15](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/15) ([timwright12](https://github.com/timwright12)) | ||
- 6407-roettger-implementSegmentedControlToApp [\#14](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/14) ([TimRoe](https://github.com/TimRoe)) | ||
- Automate Linting [\#13](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/13) ([narin](https://github.com/narin)) | ||
- Adding npm publish workflow [\#12](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/12) ([timwright12](https://github.com/timwright12)) | ||
- Storybook Docs template [\#11](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/11) ([narin](https://github.com/narin)) | ||
- 6509-roettger-segmentedControlStorybook [\#10](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/10) ([TimRoe](https://github.com/TimRoe)) | ||
- Added npm publish commands [\#9](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/9) ([timwright12](https://github.com/timwright12)) | ||
- 6353-roettger-CreateSegmentedControl [\#8](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/8) ([TimRoe](https://github.com/TimRoe)) | ||
- Figma Integration [\#7](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/7) ([narin](https://github.com/narin)) | ||
- Storybook Initial Setup [\#6](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/6) ([narin](https://github.com/narin)) | ||
- Action Required: Configure CodeQL [\#3](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/3) ([veterans-affairs-code-scanning](https://github.com/veterans-affairs-code-scanning)) | ||
- 6266-roettger-repoFoundationalStructure [\#2](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/2) ([TimRoe](https://github.com/TimRoe)) | ||
- Components automated tests [\#1](https://github.com/department-of-veterans-affairs/va-mobile-library/pull/1) ([narin](https://github.com/narin)) | ||
|
||
|
||
|
||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* |
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
Oops, something went wrong.