-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.48 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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