-
Notifications
You must be signed in to change notification settings - Fork 159
chore(cicd): Create release workflow following #366 discussion proposal 1 #369
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5b723d0
split beta and prod workflow to release two types of package
flochaz 8bd063a
chore(cicd): reet changelog
flochaz 84063d7
follow #366 discussions current proposal
flochaz 524032b
follow #366 discussions current proposal
flochaz e12d851
Merge branch 'feat/cicd/prodWorkflow' of github.com:awslabs/aws-lambd…
flochaz 8a694d0
test pre-release
flochaz 9b3fb52
chore(release): v0.2.0-test.0 [skip ci]
github-actions[bot] 33328fc
move back to main
flochaz 3f3076b
Merge branch 'feat/cicd/prodWorkflow' of github.com:awslabs/aws-lambd…
flochaz 3be1be8
Revert "chore(release): v0.2.0-test.0 [skip ci]"
flochaz 5a91078
Merge remote-tracking branch 'origin/main' into feat/cicd/prodWorkflow
flochaz a69f6ce
fix tag deletion
flochaz 4012042
Apply lastest decisions around release proces
flochaz f4a3290
Merge remote-tracking branch 'origin/main' into feat/cicd/prodWorkflow
flochaz b32f825
remove doc alias for unreleased merge PR
flochaz d8fd2c1
rename on merge to main workflow
flochaz 9f8bf47
move release drafter to on-merge-to-main
flochaz b68c5d6
Merge branch 'feat/cicd/prodWorkflow' of github.com:awslabs/aws-lambd…
flochaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,93 @@ | ||
name: on-merge-to-main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GH_PUBLISH_TOKEN }} | ||
fetch-depth: 0 | ||
######################### | ||
# Release new version | ||
######################### | ||
- name: "Use NodeJS 14" | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- name: "Setup npm" | ||
run: | | ||
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" | ||
- name: Install packages | ||
run: | | ||
npm ci | ||
npm run lerna-ci | ||
- name: Run lint | ||
run: npm run lerna-lint | ||
- name: Run tests | ||
run: npm run lerna-test | ||
- name: "Version and publish" | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_PUBLISH_TOKEN }} | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY | ||
|
||
# For merge to main we | ||
## don't create github release, | ||
## don't update changelog (--no-changelog) | ||
## bump version as a pre-release (--conventional-prerelease) | ||
## add a custom preid (--preid dev): 0.2.0-dev.1 -> 0.2.0-dev.2 | ||
npx lerna version --conventional-commits --conventional-prerelease --preid dev --force-publish=* --yes --no-changelog | ||
git push --delete origin $(git describe --abbrev=0) | ||
- name: update_release_draft: | ||
uses: release-drafter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
######################### | ||
# Generate documentation | ||
######################### | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.8' | ||
- name: Install doc generation dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r docs/requirements.txt | ||
- name: Setup doc deploy | ||
run: | | ||
git config --global user.name Docs deploy | ||
git config --global user.email [email protected] | ||
- name: Build mkdocs site in "gh-pages" branch and push | ||
run: | | ||
rm -rf site | ||
VERSION="dev" | ||
echo "Publishing doc for version: $VERSION" | ||
mkdocs build | ||
mike deploy --push "$VERSION" | ||
- name: Build API docs | ||
run: | | ||
rm -rf api | ||
npm run docs-generateApiDoc | ||
- name: Release API docs to the released version | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./api | ||
keep_files: true | ||
destination_dir: dev/api | ||
- name: Release API docs to the "latest" version | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./api | ||
keep_files: true | ||
destination_dir: latest/api |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.