Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @babel/core from 7.24.0 to 7.24.5 #691

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ jobs:
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Setup version env vars
run: |
version=${{ github.event.inputs.version }}
Expand All @@ -52,14 +49,36 @@ jobs:
exit 1
fi

- name: Check PR's approved
run: |
function prCheck () {
REPO=$1
BASE=$2
STATE=$(gh pr list --repo $GITHUB_REPOSITORY_OWNER/$REPO --json title,mergeStateStatus,state,reviews --state OPEN --base $BASE --head $RELEASE_BRANCH --jq '.[] | select(.mergeStateStatus == "CLEAN" and .reviews[].state == "APPROVED") | .reviews[].state ')
if [ "$STATE" != "APPROVED" ]; then
echo "Error: PR for merging $GITHUB_REPOSITORY_OWNER/$REPO $RELEASE_BRANCH into $BASE needs to be ready to merge and approved. (STATE=$STATE)" >&2
exit 1
fi
}
prCheck flood-app master
prCheck flood-app development
prCheck flood-service master
prCheck flood-service development
env:
# create classic PAT and then run `gh secret set GH_WORKFLOW`
GH_TOKEN: ${{ secrets.GH_WORKFLOW }}

- name: Install dependencies
run: npm install

- name: Merge release branch into master
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git switch $RELEASE_BRANCH
git switch master
git merge --ff-only $RELEASE_BRANCH
git push
git merge --no-edit $RELEASE_BRANCH
git push origin master

- name: Create GitHub Release
run: gh release create $TAG_VERSION --title "Release $VERSION" --notes "[release notes](/$RELEASE_NOTES_FILE)"
Expand All @@ -70,8 +89,8 @@ jobs:
- name: Merge release branch into development
run: |
git switch development
git merge --ff-only $RELEASE_BRANCH
git push
git merge --no-edit $RELEASE_BRANCH
git push origin development

- name: Trigger Merge Release Branch for flood-service
run: gh workflow run --repo "$GITHUB_REPOSITORY_OWNER/flood-service" merge.yml -f version="$VERSION"
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
git switch -c $RELEASE_BRANCH
git add .
git commit -m "Bump version number (${VERSION})"
git push origin $RELEASE_BRANCH
env:
FLOOD_APP_BING_KEY: "${{ secrets.FLOOD_APP_BING_KEY }}"
FLOOD_APP_BING_KEY_LOCATION: "${{ secrets.FLOOD_APP_BING_KEY_LOCATION }}"
Expand All @@ -104,10 +103,12 @@ jobs:
--template "release-docs/template.njk"
git add $release_notes_file
git commit --no-verify -m "Add release notes (${VERSION})"
git push origin $RELEASE_BRANCH
echo RELEASE_NOTES_FILE=$release_notes_file >> "$GITHUB_ENV"
fi

- name: Push changes
run: git push origin $RELEASE_BRANCH

- name: Create Draft PRs
run: |
gh pr create --base master --title "Release $VERSION" --body "TBC"
Expand All @@ -121,3 +122,11 @@ jobs:
env:
# use PAT token with repo scope (github.token didn't work)
GH_TOKEN: ${{ secrets.GH_WORKFLOW }}

- name: Clean up
if: ${{ failure() }}
run: |
if git ls-remote --exit-code origin "refs/heads/${RELEASE_BRANCH}"; then
echo "Action failed, removing created release branch"
git push --delete origin $RELEASE_BRANCH
fi
147 changes: 74 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@airbrake/node": "^2.1.8",
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.3",
"@babel/core": "^7.24.5",
"@babel/plugin-transform-runtime": "^7.23.4",
"@babel/preset-env": "^7.16.4",
"@defra/flood-webchat": "^0.0.1-beta.51",
Expand Down
7 changes: 4 additions & 3 deletions release-docs/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

## Sense Check

* Note that this is the definitive release notes for WebOps. The release notes in flood-service and flood-db are for CFF dev team use only.
* Cross check the list of Jira tickets below with those in the Jira release linked to above and update where needed
* Add additional Jira tickets from the related release notes:
* [flood-service](https://github.com/DEFRA/flood-service/blob/release/{{ version }}/release-docs/CFF-{{ version }}.md)
* Add additional Jira tickets from the related release notes in the 'Release {{ version }}' PR's created in:
* [flood-service](https://github.com/DEFRA/flood-service)
{% if dbChanges %}
* [flood-db](https://github.com/DEFRA/flood-db/blob/release{{ version }}/release-docs/CFF-{{ version }}.md)
* [flood-db](https://github.com/DEFRA/flood-db)
{% endif %}
* Add any required infrastructure changes such as redirects to the infrastructure changes section below
* Once this sense check is done, delete this section
Expand Down
Loading
Loading