From 1e9b5295b396cb921c8772c1b70d07f3b26c4529 Mon Sep 17 00:00:00 2001 From: David Wilkie Date: Fri, 24 Mar 2023 10:40:11 +0700 Subject: [PATCH 1/3] Setup build --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4ce1e3..2e542df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,12 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: ".tool-versions" + - run: npm ci - run: npm run lint --if-present - run: npm test From b46d91f97fbf6929ad3e9150cb8d5ed9a2fdf039 Mon Sep 17 00:00:00 2001 From: Samnang Chhun Date: Fri, 24 Mar 2023 05:51:40 +0000 Subject: [PATCH 2/3] Update build --- .github/dependabot.yml | 11 +++++++++++ .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c1d10fe --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e542df..e832eb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,8 +13,44 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: ".tool-versions" + cache: 'npm' - run: npm ci - run: npm run lint --if-present - run: npm test - run: npm run build + + release: + name: Release + runs-on: ubuntu-latest + + if: github.ref == 'refs/heads/setup_build' + needs: + - build + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: ".tool-versions" + cache: 'npm' + + - name: Setup node packages + run: | + npm ci + npm run build + + - name: Get release version + id: get_release_version + run: | + version=$(npm info twilio version | xargs echo) + echo "version=$version" >> $GITHUB_OUTPUT + + - uses: google-github-actions/release-please-action@v3 + id: release-please + with: + release-type: node + release-as: ${{ steps.get_release_version.outputs.version }} From 5b053a68b83ca3ac6db4b9a613606b6ad99acea2 Mon Sep 17 00:00:00 2001 From: Samnang Chhun Date: Fri, 24 Mar 2023 05:56:38 +0000 Subject: [PATCH 3/3] WIP --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e832eb6..e7a4337 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: name: Release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/setup_build' + if: github.ref == 'refs/heads/main' needs: - build