Automation to Make Releases #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automation to Make Releases | |
on: | |
workflow_run: | |
workflows: ["Linpad application"] # Name of the first workflow | |
types: | |
- completed | |
jobs: | |
create_release: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if the previous workflow succeeded | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download .deb package | |
uses: actions/download-artifact@v3 | |
with: | |
name: linpad-deb-package | |
- 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: linpad.deb # Adjusted the path to the downloaded artifact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the default token for release |