-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (37 loc) · 1.26 KB
/
release.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
40
41
42
43
44
name: Release
on:
release:
types: [created]
jobs:
release-rules:
name: Release rules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Zip rules directory
run: zip -r rules.zip rules/ -x '*_test.rego'
- name: Create Tar.gz of rules directory
run: tar -czvf rules.tar.gz --exclude='*_test.rego' rules/
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Upload Release Asset (ZIP)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./rules.zip
asset_name: rules-${{ steps.get_release.outputs.tag_name}}.zip
asset_content_type: application/zip
- name: Upload Release Asset (tar.gz)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./rules.tar.gz
asset_name: rules-${{ steps.get_release.outputs.tag_name}}.tar.gz
asset_content_type: application/gzip