From eabc5ce66bb92ad6d596c2db287b94f96089d863 Mon Sep 17 00:00:00 2001 From: Jakub Mazanec Date: Sun, 1 Oct 2023 12:58:21 +0200 Subject: [PATCH] Update GitHub workflows --- .carson/workspace.snapshot | Bin 6047 -> 6092 bytes .changeset/brown-bananas-fry.md | 5 ++ .github/workflows/pull-request.yaml | 11 +++- .github/workflows/release.yaml | 22 ++++--- .../.github/workflows/pull-request.yaml.ejs | 13 +++- .../.github/workflows/release.yaml.ejs | 20 +++--- .../workflows/update-pull-request.yaml.ejs | 60 ++++++++++-------- 7 files changed, 83 insertions(+), 48 deletions(-) create mode 100644 .changeset/brown-bananas-fry.md rename .github/workflows/generate-changeset.yaml => packages/carson-templates/templates/workspace/.github/workflows/update-pull-request.yaml.ejs (74%) diff --git a/.carson/workspace.snapshot b/.carson/workspace.snapshot index 57ea6f04c6f3252455f13bf8d4811d20f57c979c..3427ae28581d4990a9e88c26681641719cfe646f 100644 GIT binary patch delta 6054 zcmV;X7g^|^FU&8H8-H6mOO7`udRZVaBq4zV1OrH7eA>EqxHr5fxvzU>@IykhmB_W1 ziYUVhtoh!q?ScLOw~A^_-8s*z4e|h z@}Q8DIcU-gnP28{A$!;BJx~==6##!6C?N*D2RfX}Sup5r;(uaV6q(-a_e+(XPy8^Q z^`BQ0XgkC64gaaX(Ko|*x4oum`ucRJ`jKMT&w(Jc5mP%`Y-yu1eCy7)Ng zT!^0$?!ohiPgD`cy>cN=mlXYHO3O# ztQ;kAXayehMt^~p+j*eEsX<5b0y1SYSg4{Yvj~>lhuLx!B)c+`Dv~OUrDZvbRhn1S z@dQ_rFxC881(}|vEGiqFxoWu+Bw?9=cl3kIbxd~L6h&SdRfs6dWiAs5Ay4EiBT^z6 z^gb5Bh!W$u(M^!uq)hh=d%eoM>d1m$@L3jf063M(S{W)>7vxY+a7 zDuzK0XYm}J?$_Tg)BId#K`8s(4(-b`-MhYC?~VZ(k>eQh&vN}dO$+hNsxVNeYaa#* ziVoB95P$w7fl9^$6)P?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`w-AhsaP$uZzb)av99*OTXaSIKnQD@JlQD4*c56w<)wx5E)_6#K`GL zMv;v65OXE8dBusAf`z!_INR{1!?6$58|aQOIZEP1T+Bd)m*^QHylC$T0~7i0C3f-6 zSx}Kw@ga`r1||FsWMQe6AFzv=Q{yKZjGiA`cOc+~QbIn1%jHic_S}cqEKP&v1X@nx zbz#aKT{gw2ps+YfxteTI$Ir7S#P(ial(x9mOI@SD=9}qKK6KISOtYVs^vrwxXqbsB!op8BXxjBmWitDb7c2Oa(WJE7xGA~YT5z^ht zd+~^GZCXUaoDP~qVj`jGc)ljtUoyD0%4rVh{hUR9v0U?+=w6?PI zLu^al9B{KPFI$l*n@2xib*cI5bYD;p(R+JYJLj&_!yMdL!9i{k$UzBSon0?okj8w! zM(jJAjQ$uY@a#d7juu}SZYLe|TJJ!v<|Q~UZywUCZ<}z}>cxE6(7-rE-2*m|Rfg^; ZM=gA1GD|@OPzx&EXT7L$zbz3T{} diff --git a/packages/carson-templates/templates/workspace/.github/workflows/release.yaml.ejs b/packages/carson-templates/templates/workspace/.github/workflows/release.yaml.ejs index 030cad65a..829f8502d 100644 --- a/packages/carson-templates/templates/workspace/.github/workflows/release.yaml.ejs +++ b/packages/carson-templates/templates/workspace/.github/workflows/release.yaml.ejs @@ -7,7 +7,7 @@ name: Release on: [push, workflow_dispatch] jobs: - main_branch_release: + release_main_branch: name: Main branch release runs-on: ubuntu-latest timeout-minutes: 15 @@ -43,7 +43,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi @@ -60,7 +60,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi @@ -131,7 +131,7 @@ jobs: git merge <%- getMainBranch(workspace) %> --no-verify git push -u origin <%- getDevelopmentBranch(workspace) %> --no-verify - development_branch_release: + release_development_branch: name: Development branch release runs-on: ubuntu-latest timeout-minutes: 15 @@ -167,7 +167,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi @@ -184,7 +184,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi @@ -224,11 +224,11 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - feature_branch_release: + release_feature_branch: name: Feature branch release runs-on: ubuntu-latest timeout-minutes: 15 - if: "github.ref_name != '<%- getMainBranch(workspace) %>' && github.ref_name != '<%- getDevelopmentBranch(workspace) %>'" + if: "github.ref_name != '<%- getMainBranch(workspace) %>' && github.ref_name != '<%- getDevelopmentBranch(workspace) %>' && github.actor != 'renovate[bot]'" steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.11.0 @@ -260,7 +260,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi @@ -277,7 +277,7 @@ jobs: if [[ -n $git_status ]]; then echo "You have uncommitted changes!" - git status --porcelain + git diff git config --unset core.filemode exit 1 fi diff --git a/.github/workflows/generate-changeset.yaml b/packages/carson-templates/templates/workspace/.github/workflows/update-pull-request.yaml.ejs similarity index 74% rename from .github/workflows/generate-changeset.yaml rename to packages/carson-templates/templates/workspace/.github/workflows/update-pull-request.yaml.ejs index d366950ea..b0908335c 100644 --- a/.github/workflows/generate-changeset.yaml +++ b/packages/carson-templates/templates/workspace/.github/workflows/update-pull-request.yaml.ejs @@ -1,29 +1,26 @@ -name: Generate changeset +--- +to: '.github/workflows/update-pull-request.yaml' +if: 'false' +strategy: overwrite +--- +name: Update pull request on: - workflow_dispatch: pull_request_target: - paths: - - '.github/workflows/renovate.yaml' - - '**/package.json' - - '**/package-lock.json' + branches: + - development jobs: - generate-changeset: - name: Generate changeset + update_pull_request: + name: Update pull request + if: github.actor == 'renovate[bot]' runs-on: ubuntu-latest timeout-minutes: 15 - if: github.actor == 'renovate[bot]' steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} - token: ${{secrets.PAT}} + token: ${{secrets.GITHUB_TOKEN}} fetch-depth: 0 - name: Configure git @@ -31,8 +28,16 @@ jobs: git config user.email "bot@mazanec.dev" git config user.name "Bot" + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install packages + run: npm ci + - name: Generate changeset uses: actions/github-script@v6 + if: ${{ github.actor == 'renovate[bot]' }} with: script: | let { promises: fs } = require('fs'); @@ -86,14 +91,6 @@ jobs: return bumps; } - let branch = await exec.getExecOutput('git branch --show-current'); - - if (!branch.stdout.startsWith('renovate/')) { - console.log('Not a renovate branch, skipping...'); - - return; - } - let diffOutput = await exec.getExecOutput('git diff --name-only HEAD~1'); let diffFiles = diffOutput.stdout.split('\n'); @@ -111,6 +108,11 @@ jobs: if (!packageNames.length) { console.log('No package.json changes to published packages, skipping...'); + await exec.exec('npx', ['changeset', '--empty']); + await exec.exec('git', ['add', './.changeset/**', '--all']); + await exec.exec('git commit -m"Add changeset [skip actions]"'); + await exec.exec('git push --force'); + return; } @@ -121,6 +123,14 @@ jobs: let packageBumps = await getBumps(files); await createChangeset(fileName, packageBumps, packageNames); - await exec.exec('git', ['add', fileName]); - await exec.exec('git commit -C HEAD --amend --no-edit'); + await exec.exec('git', ['add', './.changeset/**', '--all']); + await exec.exec('git commit -m"Add changeset [skip actions]"'); await exec.exec('git push --force'); + + - name: Update Carson + if: ${{ github.actor == 'renovate[bot]' }} + run: | + npm install + git add . --all + git commit -m"Run Carson update [skip actions]" + git push --force