Revamp. #2
Workflow file for this run
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: Build and Release Packages | |
on: | |
push: | |
tags: | |
- '*' # Trigger the workflow on push of any tag | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@main | |
- name: Create DEB Package | |
uses: burningalchemist/nfpm-action@v1 | |
id: deb-package | |
with: | |
nfpm_version: "2.35.1" | |
config: "nfpm.yaml" # Replace with your nfpm configuration file | |
packager: "deb" | |
- name: Create RPM Package | |
uses: burningalchemist/nfpm-action@v1 | |
id: rpm-package | |
with: | |
nfpm_version: "2.35.1" | |
config: "nfpm.yaml" # Replace with your nfpm configuration file | |
packager: "rpm" | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: Release ${{ github.ref }} | |
tag_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload DEB Package to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.deb-package.outputs.package }} | |
asset_name: obsidian-shell-lib_${{ github.run_number }}_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload RPM Package to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.rpm-package.outputs.package }} | |
asset_name: obsidian-shell-lib_${{ github.run_number }}_amd64.rpm | |
asset_content_type: application/x-rpm |