From 95992dbfd721799ba07857a55aa8877efc396062 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 19:33:12 +0530 Subject: [PATCH 1/6] docs(changeset): test yml for updating changlog --- .changeset/funny-pears-invent.md | 17 +++++++++++++++++ .github/workflows/changeset-release.yml | 24 +++++++++++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .changeset/funny-pears-invent.md diff --git a/.changeset/funny-pears-invent.md b/.changeset/funny-pears-invent.md new file mode 100644 index 000000000..5ea00ae82 --- /dev/null +++ b/.changeset/funny-pears-invent.md @@ -0,0 +1,17 @@ +--- +'@packrat/shared-types': patch +'@packrat/validations': patch +'@packrat/playwright': patch +'@packrat/crosspath': patch +'@packrat/config': patch +'app': patch +'@packrat/cli': patch +'@packrat/ui': patch +'tauri-app': patch +'expo-app': patch +'next-app': patch +'vite-app': patch +'server': patch +--- + +test yml for updating changlog diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index c2cf744da..9ba2b9125 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -12,10 +12,10 @@ jobs: steps: - name: 🛠 Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🔧 Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 @@ -26,6 +26,24 @@ jobs: uses: changesets/action@v1 with: version: yarn changeset version - commit: "🔖 chore: version bump and changelog" + commit: '🔖 chore: version bump and changelog' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: 📝 Bump version and generate changelog + run: | + git fetch --all + git checkout main + npx changeset version + git add . + git commit -m "Version packages and generate changelog" + git push --follow-tags + + - name: 📦 Create GitHub Release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + body_path: ./CHANGELOG.md + draft: false + prerelease: false From 57090fdd9229d5d652f8eb5dc6705782706303fa Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 19:34:04 +0530 Subject: [PATCH 2/6] test upload and changelog --- .github/workflows/changeset-release.yml | 3 +- .github/workflows/tauri-build.yml | 55 ++++++++++++------------- package.json | 2 +- 3 files changed, 28 insertions(+), 32 deletions(-) diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index 9ba2b9125..3fa976133 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -2,8 +2,7 @@ name: Changeset Release Workflow on: push: - branches: - - main + branches: ['**'] jobs: release: diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index 0dbcd1d7e..8a1892ec4 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -1,10 +1,8 @@ -name: tauri-build +name: Tauri Build and Publish on: push: branches: ['**'] - pull_request: - branches: ['**'] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -108,29 +106,28 @@ jobs: core.setOutput('comment_id', commentId); } - - name: Update PR comment - if: always() && github.event_name == 'pull_request' - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const commentIdentifier = ''; - const commentId = '${{ steps.find_or_create_comment.outputs.comment_id }}'; - const buildOutcome = '${{ job.status }}'; - const buildStatus = buildOutcome == 'success' ? 'completed' : 'failed'; - const workflowUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; - - let commentBody = `${commentIdentifier}\nTauri build ${buildStatus}!`; - - if (buildOutcome == 'success') { - commentBody += `\nYou can download the build artifacts from the following link:\n${workflowUrl}#artifacts`; - } else { - commentBody += '\nPlease check the workflow logs for more details on the build failure.'; - } - - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: commentId, - body: commentBody - }); + upload-tauri-build: + name: Upload Tauri Build to Release + runs-on: ubuntu-latest + needs: publish-tauri + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Upload Tauri Artifacts + uses: actions/upload-artifact@v3 + with: + name: tauri-build-artifacts + path: | + apps/tauri/src-tauri/target/release/bundle/deb + apps/tauri/src-tauri/target/release/bundle/rpm + + - name: Create GitHub Release (with Tauri Artifacts) + uses: softprops/action-gh-release@v1 + with: + files: | + apps/tauri/src-tauri/target/release/bundle/deb + apps/tauri/src-tauri/target/release/bundle/rpm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 76fe22201..e03d76697 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "packrat-world", - "version": "0.0.1", + "version": "2", "description": "PackRat is the ultimate adventure planner designed for those who love to explore the great outdoors. Our app helps users plan and organize their trips with ease, whether it's a weekend camping trip, a day hike, or a cross-country road trip.", "private": true, "workspaces": [ From d6ed45777b5a569eafb7e171cd742710949938ca Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 21:54:46 +0530 Subject: [PATCH 3/6] test 1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e03d76697..76fe22201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "packrat-world", - "version": "2", + "version": "0.0.1", "description": "PackRat is the ultimate adventure planner designed for those who love to explore the great outdoors. Our app helps users plan and organize their trips with ease, whether it's a weekend camping trip, a day hike, or a cross-country road trip.", "private": true, "workspaces": [ From da3de74f4d68bb70938ec52acda9e1e54eecefee Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 21:56:47 +0530 Subject: [PATCH 4/6] test 2 --- .github/workflows/tauri-build.yml | 55 ++++++++++++++++--------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index 8a1892ec4..0dbcd1d7e 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -1,8 +1,10 @@ -name: Tauri Build and Publish +name: tauri-build on: push: branches: ['**'] + pull_request: + branches: ['**'] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -106,28 +108,29 @@ jobs: core.setOutput('comment_id', commentId); } - upload-tauri-build: - name: Upload Tauri Build to Release - runs-on: ubuntu-latest - needs: publish-tauri - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Upload Tauri Artifacts - uses: actions/upload-artifact@v3 - with: - name: tauri-build-artifacts - path: | - apps/tauri/src-tauri/target/release/bundle/deb - apps/tauri/src-tauri/target/release/bundle/rpm - - - name: Create GitHub Release (with Tauri Artifacts) - uses: softprops/action-gh-release@v1 - with: - files: | - apps/tauri/src-tauri/target/release/bundle/deb - apps/tauri/src-tauri/target/release/bundle/rpm - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Update PR comment + if: always() && github.event_name == 'pull_request' + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const commentIdentifier = ''; + const commentId = '${{ steps.find_or_create_comment.outputs.comment_id }}'; + const buildOutcome = '${{ job.status }}'; + const buildStatus = buildOutcome == 'success' ? 'completed' : 'failed'; + const workflowUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; + + let commentBody = `${commentIdentifier}\nTauri build ${buildStatus}!`; + + if (buildOutcome == 'success') { + commentBody += `\nYou can download the build artifacts from the following link:\n${workflowUrl}#artifacts`; + } else { + commentBody += '\nPlease check the workflow logs for more details on the build failure.'; + } + + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: commentId, + body: commentBody + }); From 66ecddb926aa55d1e8c5a0f42935f6ee11d7b6bb Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 22:13:14 +0530 Subject: [PATCH 5/6] Add changelog --- .github/workflows/changeset-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changeset-release.yml b/.github/workflows/changeset-release.yml index 3fa976133..9ba2b9125 100644 --- a/.github/workflows/changeset-release.yml +++ b/.github/workflows/changeset-release.yml @@ -2,7 +2,8 @@ name: Changeset Release Workflow on: push: - branches: ['**'] + branches: + - main jobs: release: From 84b9dc1c80ea61045407913958a2bc36f607fc80 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 22:23:10 +0530 Subject: [PATCH 6/6] delete funny-pears-invent.md --- .changeset/funny-pears-invent.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .changeset/funny-pears-invent.md diff --git a/.changeset/funny-pears-invent.md b/.changeset/funny-pears-invent.md deleted file mode 100644 index 5ea00ae82..000000000 --- a/.changeset/funny-pears-invent.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@packrat/shared-types': patch -'@packrat/validations': patch -'@packrat/playwright': patch -'@packrat/crosspath': patch -'@packrat/config': patch -'app': patch -'@packrat/cli': patch -'@packrat/ui': patch -'tauri-app': patch -'expo-app': patch -'next-app': patch -'vite-app': patch -'server': patch ---- - -test yml for updating changlog