From 309860139eebd53ea9737e03eb8178a41e0e841f Mon Sep 17 00:00:00 2001 From: Nagadarshan Nanjundaswamy <89433187+ndnan@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:46:13 -0500 Subject: [PATCH 01/10] Create github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..15a61d6 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From 689d9b7c578439ecd70edebb5ea62cf42b4fdd80 Mon Sep 17 00:00:00 2001 From: ndnan Date: Thu, 25 Jan 2024 16:52:10 -0500 Subject: [PATCH 02/10] GitHub Create Release --- .github/workflows/github-actions-demo.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 15a61d6..5dd55c7 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,18 +1,24 @@ name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +run-name: ${{ github.actor }} is testing out GitHub Actions on: [push] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - run: echo "The ${{ github.repository }} repository has been cloned to the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - run: echo "This job's status is ${{ job.status }}." + - run: zip -r mycoolapp_v1 mycoolapp + + - name: Create GitHub Release + - uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - with: + tag_name: ${{ github.run_number }} + release_number: Release ${{ github.run_number }} + From 91a660856654f51326b3c4d59e8dc4db5a453cef Mon Sep 17 00:00:00 2001 From: ndnan Date: Thu, 25 Jan 2024 16:56:16 -0500 Subject: [PATCH 03/10] Removed the blank line --- .github/workflows/github-actions-demo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 5dd55c7..fb84d12 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -13,7 +13,6 @@ jobs: ls ${{ github.workspace }} - run: echo "This job's status is ${{ job.status }}." - run: zip -r mycoolapp_v1 mycoolapp - - name: Create GitHub Release - uses: actions/create-release@v1 env: From 7cb9ff68e318332856ad08939ad51871220a16ff Mon Sep 17 00:00:00 2001 From: ndnan Date: Thu, 25 Jan 2024 16:58:43 -0500 Subject: [PATCH 04/10] Removed unnecessary dashes --- .github/workflows/github-actions-demo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index fb84d12..6fa7f9d 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -14,10 +14,10 @@ jobs: - run: echo "This job's status is ${{ job.status }}." - run: zip -r mycoolapp_v1 mycoolapp - name: Create GitHub Release - - uses: actions/create-release@v1 + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - with: + with: tag_name: ${{ github.run_number }} release_number: Release ${{ github.run_number }} From 4752b2650c8099d47322878cac9f9397a2bd6a4f Mon Sep 17 00:00:00 2001 From: ndnan Date: Thu, 25 Jan 2024 17:47:06 -0500 Subject: [PATCH 05/10] changed the permissions --- .github/workflows/github-actions-demo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 6fa7f9d..dcaf46b 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -13,11 +13,12 @@ jobs: ls ${{ github.workspace }} - run: echo "This job's status is ${{ job.status }}." - run: zip -r mycoolapp_v1 mycoolapp + - name: Create GitHub Release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.run_number }} + tag_name: ${{ github.run_number }} release_number: Release ${{ github.run_number }} From 861fec9a8f326919dede8eeb8a6f1b4b0818e5e8 Mon Sep 17 00:00:00 2001 From: ndnan Date: Tue, 30 Jan 2024 13:02:25 -0500 Subject: [PATCH 06/10] changed the tag --- .github/workflows/github-actions-demo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index dcaf46b..269f500 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,5 +1,5 @@ name: GitHub Actions Demo -run-name: ${{ github.actor }} is testing out GitHub Actions +run-name: ${{ github.actor }} is testing out GitHub Actions on: [push] jobs: Explore-GitHub-Actions: @@ -13,12 +13,12 @@ jobs: ls ${{ github.workspace }} - run: echo "This job's status is ${{ job.status }}." - run: zip -r mycoolapp_v1 mycoolapp - + - name: Create GitHub Release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.run_number }} + tag_name: Releases release_number: Release ${{ github.run_number }} From 31a1868c59eedb21560a6899392cb0a8dcaf80de Mon Sep 17 00:00:00 2001 From: ndnan Date: Tue, 30 Jan 2024 16:55:32 -0500 Subject: [PATCH 07/10] checking if the new zip file is visible --- .github/workflows/github-actions-demo.yml | 26 ++++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 269f500..3ce36fb 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,6 +1,10 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions on: [push] +# push: +# tags: +# - '*' + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -8,17 +12,23 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - run: echo "The ${{ github.repository }} repository has been cloned to the runner." + - name: List files in the repository run: | ls ${{ github.workspace }} + - run: echo "This job's status is ${{ job.status }}." - - run: zip -r mycoolapp_v1 mycoolapp + - run: zip -r mycoolapp_main mycoolapp/src/main + + - name: List files in the repository + run: | + ls ${{ github.workspace }} - - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: Releases - release_number: Release ${{ github.run_number }} + # - name: Create GitHub Release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: Releases + # release_number: Release ${{ github.run_number }} From 36ee78659f3cc9dd0436fc0ff6590abb5228a0a1 Mon Sep 17 00:00:00 2001 From: ndnan Date: Tue, 30 Jan 2024 17:15:46 -0500 Subject: [PATCH 08/10] on push tags --- .github/workflows/github-actions-demo.yml | 24 ++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 3ce36fb..0b921dc 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,9 +1,9 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions -on: [push] -# push: -# tags: -# - '*' +on: + push: + tags: + - '*' jobs: Explore-GitHub-Actions: @@ -24,11 +24,13 @@ jobs: run: | ls ${{ github.workspace }} - # - name: Create GitHub Release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: Releases - # release_number: Release ${{ github.run_number }} + - name: Upload more zips + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: mycoolapp_main + tag: ${{ github.ref }} + overwrite: true + body: "Uploading more zips" + From 7790196a2136a83b89d4acc8e8cb89712cf289fd Mon Sep 17 00:00:00 2001 From: ndnan Date: Tue, 30 Jan 2024 17:19:08 -0500 Subject: [PATCH 09/10] corrected file name --- .github/workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 0b921dc..44f8203 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -28,7 +28,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: mycoolapp_main + file: mycoolapp_main.zip tag: ${{ github.ref }} overwrite: true body: "Uploading more zips" From 01c12a4e313eae4a0e65ffbf15ef7b951a58e0cb Mon Sep 17 00:00:00 2001 From: ndnan Date: Thu, 1 Feb 2024 12:38:22 -0500 Subject: [PATCH 10/10] github marketplace package --- .github/workflows/github-actions-demo.yml | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 44f8203..9e4dad0 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -24,13 +24,24 @@ jobs: run: | ls ${{ github.workspace }} - - name: Upload more zips - uses: svenstaro/upload-release-action@v2 + - name: Create Release + id: create_release_id + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: mycoolapp_main.zip - tag: ${{ github.ref }} - overwrite: true - body: "Uploading more zips" + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + + - name: Upload Release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release_id.outputs.upload_url }} + asset_path: mycoolapp_main.zip + asset_name: mycoolapp_main.zip + asset_content_type: application/zip +