-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.76 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
56
57
58
59
60
name: release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
cache: false
- name: Checkout
uses: actions/checkout@v4
- name: Golangci Lint
uses: golangci/golangci-lint-action@v4
- name: Run tests
run: go test -race
- name: Build project
run: |
docker run --rm -v "$PWD:/app" -w /app krakend/builder:2.6.2 go build -buildmode=plugin -o krakend-http-cache.so .
docker run --rm -v "$PWD/krakend-http-cache.so:/app/krakend-http-cache.so" -w /app devopsfaith/krakend:2.6.2 krakend test-plugin -sc krakend-http-cache.so
zip ./krakend-http-cache.zip ./krakend-http-cache.so
- name: Bump version and push tag
id: bump_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
WITH_V: true
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_tag.outputs.new_tag }}
release_name: Release ${{ steps.bump_tag.outputs.new_tag }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.JENKSY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./krakend-http-cache.zip
asset_name: krakend-http-cache.zip
asset_content_type: application/zip