Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
78 changes: 21 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Release (Remember manual steps)
on: workflow_dispatch
jobs:
release:
Expand All @@ -23,10 +23,29 @@ jobs:
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version: 18.x
- uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b
name: Setup Java
with:
distribution: temurin
java-version: 11.x
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
name: Setup Python
with:
python-version: 3.x
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9
name: Setup .NET
with:
dotnet-version: 9.0.x
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
name: Setup Go
with:
go-version: ^1.16.0
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: release
run: npx projen release
run: |
unset CI
npx projen release
- name: Backup artifact permissions
run: cd dist && getfacl -R . > permissions-backup.acl
continue-on-error: true
Expand Down Expand Up @@ -55,16 +74,6 @@ jobs:
- name: Restore build artifact permissions
run: cd dist && setfacl --restore=permissions-backup.acl
continue-on-error: true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: .repo
- name: Install Dependencies
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create js artifact
run: cd .repo && npx projen compile && npx projen package:js
- name: Collect js Artifact
run: mv .repo/dist/js dist/js
- name: Release
env:
NPM_DIST_TAG: latest
Expand Down Expand Up @@ -105,16 +114,6 @@ jobs:
- name: Restore build artifact permissions
run: cd dist && setfacl --restore=permissions-backup.acl
continue-on-error: true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: .repo
- name: Install Dependencies
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create java artifact
run: cd .repo && npx projen compile && npx projen package:java
- name: Collect java Artifact
run: mv .repo/dist/java dist/java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we do some move files/directories, have you been able to check that this change works and releases are done correctly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, see here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

- name: Release
env:
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
Expand Down Expand Up @@ -156,16 +155,6 @@ jobs:
- name: Restore build artifact permissions
run: cd dist && setfacl --restore=permissions-backup.acl
continue-on-error: true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: .repo
- name: Install Dependencies
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create python artifact
run: cd .repo && npx projen compile && npx projen package:python
- name: Collect python Artifact
run: mv .repo/dist/python dist/python
- name: Release
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
Expand Down Expand Up @@ -204,21 +193,6 @@ jobs:
- name: Restore build artifact permissions
run: cd dist && setfacl --restore=permissions-backup.acl
continue-on-error: true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: .repo
fetch-depth: 0
- name: Install Dependencies
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create dotnet artifact
run: |
cd .repo
npx projen bump
npx projen compile
npx projen package:dotnet
- name: Collect dotnet Artifact
run: mv .repo/dist/dotnet dist/dotnet
- name: Extract Version
id: extract-version
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
Expand Down Expand Up @@ -270,16 +244,6 @@ jobs:
- name: Restore build artifact permissions
run: cd dist && setfacl --restore=permissions-backup.acl
continue-on-error: true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: .repo
- name: Install Dependencies
run: cd .repo && yarn install --check-files --frozen-lockfile
- name: Create go artifact
run: cd .repo && npx projen compile && npx projen package:go
- name: Collect go Artifact
run: mv .repo/dist/go dist/go
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }}
Expand Down
11 changes: 9 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@

## Stable release

Stable releases are managed by the [Release GitHub Action](https://github.com/mongodb/awscdk-resources-mongodbatlas/actions/workflows/release.yml). You can release a new CDK version by manually trigger the action.
Stable releases are managed by the [Release GitHub Action](https://github.com/mongodb/awscdk-resources-mongodbatlas/actions/workflows/release.yml). You can release a new CDK version by manually trigger the action ([REMEMBER Manual Steps Below](#manual-steps)).

![Screenshot 2023-04-20 at 10 35 11](https://user-images.githubusercontent.com/5663078/233325734-0f469045-f91b-436c-8dd5-19d1e8f24c57.png)

### Manual Steps
After the action finishes successfully you have to manually release the Go package:
- Go to the [Go repo](https://github.com/mongodb/awscdk-resources-mongodbatlas-go) and check that the latest commit happened now with the same release as in this repo, e.g. `chore(release): v3.0.0`.
- Go to the [Go Repo release page](https://github.com/mongodb/awscdk-resources-mongodbatlas-go/releases).
- Select the latest release that has to be the same as the one in this repo, e.g. `awscdkresourcemongodbatlas/v3.0.0`, name will be like `v3.0.0`, click "Generate release notes" and make sure "Set as latest release" is checked.

Also, to ensure no silent errors, look for the specific `vX.Y.Z` language releases:
- [Javascript](https://www.npmjs.com/package/awscdk-resources-mongodbatlas?activeTab=versions)
- [Java](https://central.sonatype.com/artifact/org.mongodb/awscdk-resources-mongodbatlas/versions)
- [Python](https://pypi.org/project/awscdk-resources-mongodbatlas/#history)
- [Golang](https://github.com/mongodb/awscdk-resources-mongodbatlas-go/releases)
- [Nuget](https://www.nuget.org/packages/MongoDB.AWSCDKResourcesMongoDBAtlas#versions-body-tab)

## Versioning
The release version is determinated based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) in that release.


## Release troubleshooting
If the Release Gitub Action fails, it can happen that the new version is published only to some repositories,
but the failing ones are still in the current version.
Expand Down
Loading