|
8 | 8 | name: Release |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
| 11 | + - uses: actions/checkout@v3 |
| 12 | + - uses: actions/setup-go@v3 |
| 13 | + with: |
| 14 | + go-version: 1.20.x |
| 15 | + - run: go mod download |
| 16 | + - run: go test -v ./... |
| 17 | + - run: go build -v . |
| 18 | + - run: ./test.sh |
11 | 19 |
|
12 | | - - name: Set up Go |
13 | | - uses: actions/setup-go@v3 |
14 | | - with: |
15 | | - go-version: 1.18 |
16 | | - id: go |
| 20 | + - name: Create release |
| 21 | + uses: actions/create-release@v1 |
| 22 | + id: release |
| 23 | + env: |
| 24 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + with: |
| 26 | + tag_name: ${{ github.ref }} |
| 27 | + release_name: ${{ github.ref }} |
| 28 | + draft: false |
17 | 29 |
|
18 | | - - name: Check out code into the Go module directory |
19 | | - uses: actions/checkout@v3 |
20 | | - |
21 | | - - name: Get dependencies |
22 | | - run: | |
23 | | - go get -v -t -d ./... |
24 | | -
|
25 | | - - name: Run tests |
26 | | - run: go test -v ./... |
27 | | - |
28 | | - - name: Build |
29 | | - run: go build -v . |
30 | | - |
31 | | - - name: Create release |
32 | | - id: create_release |
33 | | - uses: actions/create-release@v1 |
34 | | - env: |
35 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
36 | | - with: |
37 | | - tag_name: ${{ github.ref }} |
38 | | - release_name: ${{ github.ref }} |
39 | | - draft: false |
40 | | - |
41 | | - - name: Upload artifacts |
42 | | - uses: actions/upload-release-asset@v1.0.1 |
43 | | - env: |
44 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
45 | | - with: |
46 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
47 | | - asset_path: ./crd-ref-docs |
48 | | - asset_name: crd-ref-docs |
49 | | - asset_content_type: application/octet-stream |
| 30 | + - name: Upload artifacts |
| 31 | + uses: actions/upload-release-asset@v1.0.1 |
| 32 | + env: |
| 33 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + with: |
| 35 | + upload_url: ${{ steps.release.outputs.upload_url }} |
| 36 | + asset_path: ./crd-ref-docs |
| 37 | + asset_name: crd-ref-docs |
| 38 | + asset_content_type: application/octet-stream |
0 commit comments