From 81922a7536c64c7131435d2e4386f61c2ef9920b Mon Sep 17 00:00:00 2001 From: pbrobles Date: Fri, 13 Sep 2024 09:32:57 -0500 Subject: [PATCH] INFRA-3185: publishing current version. --- .github/dependabot.yml | 27 ++++++++++++++ .github/workflows/build-publish.yml | 57 +++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..a1ee06c77 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + time: "09:00" + timezone: "America/Los_Angeles" + ignore: + - dependency-name: "*" + update-types: [version-update:semver-major] + open-pull-requests-limit: 5 + commit-message: + prefix: "bot: update npm dependencies: " + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + time: "09:00" + timezone: "America/Los_Angeles" + open-pull-requests-limit: 10 + commit-message: + prefix: "[no-jira] bot: update github-actions image to " + diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml new file mode 100644 index 000000000..36e1d9227 --- /dev/null +++ b/.github/workflows/build-publish.yml @@ -0,0 +1,57 @@ +name: build-publish +permissions: + contents: write + id-token: write + packages: write + +on: + pull_request_target: + types: + - closed + branches: + - master + +jobs: + build-publish: + name: build publish artifact + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: master + fetch-depth: 0 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 16.x + registry-url: https://npm.pkg.github.com/ + scope: '@parsable' + cache: yarn + env: + NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}} + - name: Install Dependencies + run: yarn install + env: + NODE_AUTH_TOKEN: ${{secrets.GH_PAT_CLASSIC_MACHINE_PARSABLE}} + - name: Tag + id: tag + run: | + truncated_version=1.0.4 + git config --global user.email "ops+machine-parsable@parsable.com" + git config --global user.name "machine-parsable" + npm version -m "Updating package.json for version ${truncated_version}" ${truncated_version} + git pull --ff-only + git push origin $(git branch --show-current) --tags + git status + echo "new_tag=${truncated_version}" >> $GITHUB_OUTPUT + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GH_PARSABLE_BOT_BYPASS }} + run: gh release create "${{steps.version.outputs.version}}" + - name: publishing artifact + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}