-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (45 loc) · 1.37 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
name: Release
on:
workflow_dispatch:
permissions:
contents: write
env:
GH_USER: "bearer-bot"
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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@v3
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 Java
run: tar -czvf release/java.tar.gz --directory ./rules java
- 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