Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
galendu authored Nov 20, 2023
1 parent 1d05294 commit d39637f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create RPM Release

jobs:
build:
name: Create RPM Release
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@master

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- Create RPM
- Upload Source RPM
draft: false
prerelease: false

- name: build RPM package
id: rpm_build
uses: naveenrajm7/rpmbuild@master
with:
spec_file: "cello.spec"

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ steps.rpm_build.outputs.source_rpm_path }}
asset_name: ${{ steps.rpm_build.outputs.source_rpm_name }}
asset_content_type: ${{ steps.rpm_build.outputs.rpm_content_type }}

0 comments on commit d39637f

Please sign in to comment.