From 5b0b5a1b09e5262aa7e88ecce7739453ce568ffc Mon Sep 17 00:00:00 2001 From: Vicente <70909800+vicentefelipechile@users.noreply.github.com> Date: Wed, 28 Jun 2023 07:56:02 -0400 Subject: [PATCH 1/3] Changed the compilator to main branch --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0a77d5c..6ffc311 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ "dev" ] + branches: [ "main" ] pull_request: - branches: [ "dev" ] + branches: [ "main" ] env: CARGO_TERM_COLOR: always From 93cbbc24361710c87c360c6287588724fb13adc5 Mon Sep 17 00:00:00 2001 From: Vicente <70909800+vicentefelipechile@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:47:13 -0400 Subject: [PATCH 2/3] Added Major version & minor version to the name of build --- .github/workflows/rust.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6ffc311..7ef14fa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,8 @@ on: env: CARGO_TERM_COLOR: always + VERSION_MAJOR: 1 + VERSION_MINOR: 0 jobs: build_windows: @@ -39,8 +41,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: ${{ github.run_number }} - release_name: Release ${{ github.run_number }} + tag_name: v${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}.${{ github.run_number }} + release_name: Release ${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}.${{ github.run_number }} - name: Upload MSI id: upload-release-asset-msi @@ -50,7 +52,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./src-tauri/target/release/bundle/msi/file-explorer_0.0.0_x64_en-US.msi - asset_name: file-explorer_${{ github.run_number }}_x64_en-US.msi + asset_name: file-explorer_${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}_x64_en-US.msi asset_content_type: application/x-msi - name: Upload Executable @@ -61,5 +63,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./src-tauri/target/release/bundle/nsis/file-explorer_0.0.0_x64-setup.exe - asset_name: file-explorer_${{ github.run_number }}_x64-setup.exe + asset_name: file-explorer_${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}_x64-setup.exe asset_content_type: application/x-msdownload From 4b40a755a66a0428a1fe7734fc63c83af59c2ac4 Mon Sep 17 00:00:00 2001 From: Vicente <70909800+vicentefelipechile@users.noreply.github.com> Date: Wed, 28 Jun 2023 11:48:10 -0400 Subject: [PATCH 3/3] Fix error writing twice the patch version --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7ef14fa..911ba5b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -41,8 +41,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: v${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}.${{ github.run_number }} - release_name: Release ${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }}.${{ github.run_number }} + tag_name: v${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }} + release_name: Release ${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${{ github.run_number }} - name: Upload MSI id: upload-release-asset-msi