Skip to content

Commit

Permalink
Refactor release workflow to trigger release.yml by pushing the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
maizied.majumder committed Oct 24, 2024
1 parent 4909ac6 commit 0581d5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3 # Updated to v3
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v3
Expand Down Expand Up @@ -92,4 +92,4 @@ jobs:
NEW_VERSION="v${VERSION_ARRAY[0]}.${VERSION_ARRAY[1]}.$NEW_LAST-beta"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
git tag $NEW_VERSION
git push origin --tags # Ensure the tag is pushed
git push origin --tags # Trigger the release.yml by pushing the tag
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ name: Automation to Make Releases

on:
push:
branches:
- "Automatic-release-deb-file-in-github"
tags:
- 'v*.*.*-beta'
- 'v*.*.*-beta' # Trigger on the tag created from python-app.yml

jobs:
create_release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3 # Updated to v3
uses: actions/checkout@v3

- name: Download .deb package
uses: actions/download-artifact@v3
Expand All @@ -33,6 +31,6 @@ jobs:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
body: "Release of Linpad application version ${{ env.VERSION }}"
files: output/linpad.deb # Ensure this path exists
files: output/linpad.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0581d5d

Please sign in to comment.