-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'daaf009df3a9eb52f136596fb9d5d62b6a323572' into release
- Loading branch information
Showing
11 changed files
with
120 additions
and
15 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 |
---|---|---|
|
@@ -29,17 +29,8 @@ jobs: | |
- name: Install dependencies | ||
run: yarn --frozen-lockfile --cache-folder .yarn | ||
|
||
- name: Build runtime | ||
run: yarn workspace @millihq/tf-next-runtime build | ||
|
||
- name: Build tf-next | ||
run: yarn workspace tf-next build | ||
|
||
- name: Build proxy | ||
run: yarn workspace @millihq/terraform-next-proxy build | ||
|
||
- name: Build deploy-trigger | ||
run: yarn workspace @millihq/terraform-next-deploy-trigger build | ||
- name: Build | ||
run: yarn build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
|
@@ -48,7 +39,9 @@ jobs: | |
path: | | ||
packages/runtime/dist/ | ||
packages/tf-next/dist/ | ||
packages/proxy/dist/ | ||
packages/proxy/dist.zip | ||
packages/deploy-trigger/dist/ | ||
packages/deploy-trigger/dist.zip | ||
if-no-files-found: error | ||
|
||
|
@@ -185,3 +178,51 @@ jobs: | |
cat sam-local.log | ||
printf "\n\nOutput of sam-api.log:\n" | ||
cat sam-api.log | ||
publishRelease: | ||
name: Potentially publish release | ||
runs-on: ubuntu-latest | ||
needs: [build, test-integration, test-e2e] | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 25 | ||
|
||
- name: Fetch git tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: packages | ||
|
||
# git user is required (bot not used) by release-it | ||
- name: Set git user to GitHub Actions | ||
uses: fregante/[email protected] | ||
|
||
- name: Set registry for publish | ||
run: yarn config set registry https://registry.npmjs.org | ||
|
||
- name: Publish packages | ||
run: ./scripts/publish-release.sh | ||
continue-on-error: true | ||
|
||
- name: Save npm logs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: npm-logs | ||
path: /home/runner/.npm/_logs/ |
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 |
---|---|---|
|
@@ -20,3 +20,5 @@ node_modules | |
.direnv | ||
.envrc | ||
|
||
# Turbo | ||
.turbo |
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
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
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
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,26 @@ | ||
|
||
#!/bin/bash | ||
|
||
git describe --exact-match | ||
|
||
if [[ ! $? -eq 0 ]];then | ||
echo "Nothing to publish, exiting.." | ||
exit 0; | ||
fi | ||
|
||
if [[ -z "$NPM_TOKEN" ]];then | ||
echo "No NPM_TOKEN, exiting.." | ||
exit 0; | ||
fi | ||
|
||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
|
||
if [[ $(git describe --exact-match 2> /dev/null || :) =~ "packages-v" ]];then | ||
echo "Publishing version" | ||
yarn release:ci | ||
|
||
# Make sure to exit script with code 1 if publish failed | ||
if [[ ! $? -eq 0 ]];then | ||
exit 1; | ||
fi | ||
fi |
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