-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (32 loc) · 1.05 KB
/
Copy pathrelease-assets.yml
File metadata and controls
39 lines (32 loc) · 1.05 KB
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
name: Build release archives
on:
release:
types: [published]
jobs:
build-and-upload-assets:
name: Build zip and tar.gz and upload to release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build archives from release tag
shell: bash
run: |
set -euo pipefail
TAG="${{ github.event.release.tag_name }}"
PREFIX="github_monitor_${TAG}"
git archive --format=zip --output "${PREFIX}.zip" "${TAG}"
git archive --format=tar.gz --output "${PREFIX}.tar.gz" "${TAG}"
ls -lh "${PREFIX}.zip" "${PREFIX}.tar.gz"
- name: Upload archives to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
github_monitor_${{ github.event.release.tag_name }}.zip
github_monitor_${{ github.event.release.tag_name }}.tar.gz
fail_on_unmatched_files: true
overwrite_files: true