Skip to content

Commit

Permalink
Refactor release workflow to tag and push beta versions
Browse files Browse the repository at this point in the history
  • Loading branch information
maizied.majumder committed Oct 24, 2024
1 parent ec9ba56 commit 4909ac6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy Jekyll with GitHub Pages dependencies preinstalled
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches: ["Automatic-release-deb-file-in-githu"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
id-token: write
contents: read
attestations: write

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3 # Updated to 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 $NEW_VERSION
git push origin --tags # Ensure the tag is pushed
59 changes: 30 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
name: Automation to Make Releases

on:
push:
branches:
- "Automatic-release-deb-file-in-github"
tags:
- 'v*.*.*-beta'
push:
branches:
- "Automatic-release-deb-file-in-github"
tags:
- 'v*.*.*-beta'

jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
create_release:
runs-on: ubuntu-latest

- name: Download .deb package
uses: actions/download-artifact@v3
with:
name: linpad-deb-package
steps:
- name: Checkout code
uses: actions/checkout@v3 # Updated to v3

- name: Get current version
id: get_version
run: |
TAG=$(git describe --tags --abbrev=0)
VERSION=${TAG//v/}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Download .deb package
uses: actions/download-artifact@v3
with:
name: linpad-deb-package

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
body: "Release of Linpad application version ${{ env.VERSION }}"
files: output/linpad.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current version
id: get_version
run: |
TAG=$(git describe --tags --abbrev=0)
VERSION=${TAG//v/}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
body: "Release of Linpad application version ${{ env.VERSION }}"
files: output/linpad.deb # Ensure this path exists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4909ac6

Please sign in to comment.