-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (51 loc) · 1.64 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
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
workflow_dispatch:
permissions:
contents: write
env:
GH_USER: "bearer-bot"
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
if: startsWith(github.ref, 'refs/tags') != true
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: v
default_bump: patch
outputs:
ref: refs/tags/${{ steps.tag_version.outputs.new_tag || github.ref_name }}
tag_name: ${{ steps.tag_version.outputs.new_tag || github.ref_name }}
build:
needs: [tag]
name: build-rules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: mkdir release
- name: Archive Ruby
run: tar -czvf release/ruby.tar.gz --directory ./rules ruby
- name: Archive JavaScript
run: tar -czvf release/javascript.tar.gz --directory ./rules javascript
- name: Archive PHP
run: tar -czvf release/php.tar.gz --directory ./rules php
- name: Archive Java
run: tar -czvf release/java.tar.gz --directory ./rules java
- name: Archive Python
run: tar -czvf release/python.tar.gz --directory ./rules python
- name: Archive Go
run: tar -czvf release/go.tar.gz --directory ./rules go
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "release/*"
tag: ${{ needs.tag.outputs.tag_name }}
name: ${{ needs.tag.outputs.tag_name }}
generateReleaseNotes: true