Skip to content

Commit 4925026

Browse files
authored
separates ci and release workflows (#2)
1 parent 8c17ab3 commit 4925026

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build PRs
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Build the Plugin
14+
run: make build-docker
15+
16+
- name: Upload build artifacts
17+
uses: actions/upload-artifact@v2
18+
with:
19+
name: plugin-binaries
20+
path: releases

.github/workflows/build-plugin.yml renamed to .github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Build and Release Waypoint Plugin
22
on:
33
push:
4-
branches:
5-
- main
4+
tags:
5+
- "v*"
66

77
jobs:
88
build:
@@ -19,8 +19,8 @@ jobs:
1919
name: plugin-binaries
2020
path: releases
2121

22+
2223
create_release:
23-
if: contains(github.ref, 'v')
2424
runs-on: ubuntu-latest
2525
needs: build
2626

@@ -39,14 +39,14 @@ jobs:
3939
outputs:
4040
upload_url: ${{ steps.create_release.outputs.upload_url }}
4141

42+
4243
upload_assets:
43-
if: contains(github.ref, 'v')
4444
runs-on: ubuntu-latest
4545
needs: create_release
4646

4747
strategy:
4848
matrix:
49-
os: [darwin_amd64, linux_amd64, windows_386, windows_amd64]
49+
os: [darwin_amd64, linux_amd64, windows_amd64]
5050

5151
steps:
5252
- name: Download built plugin binaries

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ build:
2727
GOOS=linux GOARCH=amd64 go build -o ./bin/linux_amd64/waypoint-plugin-${PLUGIN_NAME} ./main.go
2828
GOOS=darwin GOARCH=amd64 go build -o ./bin/darwin_amd64/waypoint-plugin-${PLUGIN_NAME} ./main.go
2929
GOOS=windows GOARCH=amd64 go build -o ./bin/windows_amd64/waypoint-plugin-${PLUGIN_NAME}.exe ./main.go
30-
GOOS=windows GOARCH=386 go build -o ./bin/windows_386/waypoint-plugin-${PLUGIN_NAME}.exe ./main.go
3130

3231
# Install the plugin locally
3332
install:
@@ -41,7 +40,6 @@ zip:
4140
zip -j ./bin/waypoint-plugin-${PLUGIN_NAME}_linux_amd64.zip ./bin/linux_amd64/waypoint-plugin-${PLUGIN_NAME}
4241
zip -j ./bin/waypoint-plugin-${PLUGIN_NAME}_darwin_amd64.zip ./bin/darwin_amd64/waypoint-plugin-${PLUGIN_NAME}
4342
zip -j ./bin/waypoint-plugin-${PLUGIN_NAME}_windows_amd64.zip ./bin/windows_amd64/waypoint-plugin-${PLUGIN_NAME}.exe
44-
zip -j ./bin/waypoint-plugin-${PLUGIN_NAME}_windows_386.zip ./bin/windows_386/waypoint-plugin-${PLUGIN_NAME}.exe
4543

4644
# Build the plugin using a Docker container
4745
build-docker:

0 commit comments

Comments
 (0)