From 8487c059c6ef0e120a8727bd86af65ec1ffed5c5 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 07:59:04 +0000 Subject: [PATCH 01/12] Create main.yml --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6f2789f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: Create Release + +on: + push: + branches: + - master + tags: + - '*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Git tag + id: tag_version + run: echo "::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.TAG_NAME }} + release_name: Release ${{ steps.tag_version.outputs.TAG_NAME }} + draft: false + prerelease: false From 86fdb071f680f47c1a948f153e3670002a7f8205 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:13:16 +0000 Subject: [PATCH 02/12] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f2789f..42c2539 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,10 +16,9 @@ jobs: - name: Set up Git tag id: tag_version - run: echo "::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}" + run: echo "::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}" - name: Create Release - id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 411f42bff59b04efab2cbf31599fdc79c3921816 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:18:07 +0000 Subject: [PATCH 03/12] Update main.yml --- .github/workflows/main.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42c2539..ab38515 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,25 +5,26 @@ on: branches: - master tags: - - '*.*.*' + - 'v*.*.*' jobs: - build: + create-release: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up Git tag - id: tag_version - run: echo "::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}" + - name: Extract tag name + id: extract_tag + shell: bash + run: echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})" - name: Create Release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.tag_version.outputs.TAG_NAME }} - release_name: Release ${{ steps.tag_version.outputs.TAG_NAME }} + tag_name: ${{ steps.extract_tag.outputs.tag }} + release_name: Release ${{ steps.extract_tag.outputs.tag }} draft: false prerelease: false From 73ed05ced0eda1ea469a598e7c44bbf2fcf44934 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:18:33 +0000 Subject: [PATCH 04/12] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab38515..bfeb000 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: branches: - master tags: - - 'v*.*.*' + - '*.*.*' jobs: create-release: From cb86b6be49f19485ccf547abf538997917795c86 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:26:02 +0000 Subject: [PATCH 05/12] Update main.yml --- .github/workflows/main.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfeb000..2ada895 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ name: Create Release - on: push: branches: @@ -12,19 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 - - - name: Extract tag name - id: extract_tag - shell: bash - run: echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})" - + uses: actions/checkout@v3 + - name: Extract tag name and set as env var + run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Create Release - uses: actions/create-release@v1 + uses: actions/create-release@v1 # Check for an updated version that supports Node.js 20 env: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ env.tag }} with: - tag_name: ${{ steps.extract_tag.outputs.tag }} - release_name: Release ${{ steps.extract_tag.outputs.tag }} + tag_name: ${{ env.tag }} + release_name: Release ${{ env.tag }} draft: false prerelease: false From 022aa3a3dbe86f1ebdc77fed0f0c1053c50c95d3 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:46:54 +0000 Subject: [PATCH 06/12] Update main.yml --- .github/workflows/main.yml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ada895..84e8697 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,26 +1,25 @@ -name: Create Release +name: Publish + on: push: - branches: - - master tags: - - '*.*.*' + - '*' jobs: - create-release: + build: + name: Publish Zip runs-on: ubuntu-latest + steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Extract tag name and set as env var - run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - name: Create Release - uses: actions/create-release@v1 # Check for an updated version that supports Node.js 20 env: - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ env.tag }} - with: - tag_name: ${{ env.tag }} - release_name: Release ${{ env.tag }} - draft: false - prerelease: false + - uses: actions/checkout@v3 + # - name: Build + # run: cargo build --release + - name: Upload Zip to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/mything + asset_name: mything + tag: ${{ github.ref }} + overwrite: true + body: "This is my release text" From 2d26ccbe209827370cce20186c3bb8d029c7c3ae Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:50:19 +0000 Subject: [PATCH 07/12] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 84e8697..1df5b15 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,3 +23,4 @@ jobs: tag: ${{ github.ref }} overwrite: true body: "This is my release text" + From 316af3827e823e9fcf5de2852f5e9eff117ae7d3 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:52:55 +0000 Subject: [PATCH 08/12] Update main.yml --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1df5b15..648f8b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,17 +3,16 @@ name: Publish on: push: tags: - - '*' + - '*.*.*' jobs: - build: + create-release: name: Publish Zip runs-on: ubuntu-latest steps: + - name: Checkout code - uses: actions/checkout@v3 - # - name: Build - # run: cargo build --release - name: Upload Zip to release uses: svenstaro/upload-release-action@v2 with: From bbd6b03bca60a71523712d17553abb4b4f758555 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:54:53 +0000 Subject: [PATCH 09/12] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 648f8b7..5833571 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,12 +6,11 @@ on: - '*.*.*' jobs: - create-release: + create-release: name: Publish Zip runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - name: Upload Zip to release uses: svenstaro/upload-release-action@v2 From d0a9be071df887993b85217d28071eba686b0aad Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 08:56:13 +0000 Subject: [PATCH 10/12] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5833571..88cfe4d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,11 +7,11 @@ on: jobs: create-release: - name: Publish Zip runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - name: Upload Zip to release uses: svenstaro/upload-release-action@v2 with: From ddd926d33b45b9f0bc6d2c0ade396498a706cbac Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 09:03:48 +0000 Subject: [PATCH 11/12] Update main.yml --- .github/workflows/main.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88cfe4d..83fef4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,24 +1,27 @@ -name: Publish + +name: Create release on: push: + branches: + - master tags: - '*.*.*' jobs: - create-release: + build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Upload Zip to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/mything - asset_name: mything - tag: ${{ github.ref }} - overwrite: true - body: "This is my release text" - + - uses: actions/checkout@v2 + + - name: Zip Folder + run: zip -r ${{ github.event.repository.name }}.zip . + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ github.event.repository.name }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f97a9520d0f4730d6fa45f93f695c4625c98983 Mon Sep 17 00:00:00 2001 From: Nicolas Reinhard Date: Mon, 19 Feb 2024 09:05:42 +0000 Subject: [PATCH 12/12] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83fef4f..3c5be20 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,4 +24,4 @@ jobs: with: files: ${{ github.event.repository.name }}.zip env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}