-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.14 KB
/
createrelease.yml
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: Create Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
name: Release pushed tag
runs-on: ubuntu-22.04
steps:
- name: Create release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--target main \
--title="${GITHUB_REPOSITORY#*/} ${{ github.ref_name }}" \
--generate-notes
- name: build artifacts
run: |
mkdir artifacts
tar --exclude="test" --exclude="artifacts" --exclude=".git" --exclude=".github" -zcvf artifacts/harpy.${{ github.ref_name }}.tar.gz .
- name: upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/harpy.${{ github.ref_name }}.tar.gz
asset_name: harpy.${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip