Skip to content

Create Release

Create Release #8

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version number for the release (e.g., 1.0.0)'
required: true
default: '1.0.0'
permissions:
contents: write # Grant write access to repository contents
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Zip the necessary files
- name: Create zip file
run: |
zip krems_release.zip krems.rb Gemfile
# Create a release
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: Release v${{ github.event.inputs.version }}
body: |
This release includes the following files:
- krems.rb
- Gemfile
draft: false
prerelease: false
# Upload the zip file to the release
- name: Upload zip file 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: ./krems_release.zip
asset_name: krems_release_${{ github.event.inputs.version }}.zip
asset_content_type: application/zip