Skip to content

Commit b065cc9

Browse files
authored
Merge pull request #49 from geraltrivyan/POD-1853
Added CI and publish on Git Action
2 parents 88fe99f + 51d3fd7 commit b065cc9

4 files changed

Lines changed: 54 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-package:
7+
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
8+
runs-on: ubuntu-latest
9+
name: test-package
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Use Go 1.11 and Test
15+
uses: cedrickring/golang-action/go1.11@1.6.0
16+
env:
17+
IMPORT: "ProspectOne/perfops-cli"
18+
19+
publish-package:
20+
needs: test-package
21+
name: publish-package
22+
runs-on: ubuntu-latest
23+
if: ${{ github.ref == 'refs/heads/master' }}
24+
steps:
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 14.x
28+
registry-url: https://npm.pkg.github.com/
29+
- uses: actions/checkout@v1
30+
- name: install
31+
run: |
32+
npm install semantic-release @semantic-release/exec -g
33+
- name: release
34+
run: semantic-release
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}
37+
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

.releaserc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins":
3+
[
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/github",
7+
["@semantic-release/exec", {
8+
"publishCmd": "go get -v -d ./ && bash hack/build-all.sh && bash hack/build-pkgs.sh"
9+
}]
10+
]
11+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PerfOps cli - Global network testing and benchmarking
22

3-
[![Build Status](https://semaphoreci.com/api/v1/projects/77896bab-6c47-4549-8018-05f07b60d941/1495977/badge.svg)](https://semaphoreci.com/prospectone/perfops-cli)
3+
![Build Status](https://github.com/ProspectOne/perfops-cli/actions/workflows/publish.yml/badge.svg)
44

55
A simple command line tool to interact with hundreds of servers around the world. Run benchmarks and debug your infrastructure without leaving your console. [More information](https://perfops.net/cli)
66

hack/build-pkgs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null)
2222
PKG_VERSION="${VERSION:1}"
2323

2424
sudo apt-get install build-essential rpm -y
25-
gem install --no-ri --no-rdoc fpm
26-
gem install --no-ri --no-rdoc package_cloud
27-
gem install --no-ri --no-rdoc rest-client
25+
sudo gem install --no-document fpm
26+
sudo gem install --no-document package_cloud
27+
sudo gem install --no-document rest-client
2828

2929
mkdir -p release/pkgs
3030

3131
PERFOPS_FPM_TARGETS="deb rpm"
3232
for TARGET in ${PERFOPS_FPM_TARGETS[@]}; do
3333
echo "Building package $TARGET"
3434
fpm -t $TARGET --rpm-os linux -v $PKG_VERSION -s dir -p release/pkgs/ \
35-
-n perfops --license ALv2 --vendor ProspectOne -m "PerfOps Support <dak@prospectone.io>" \
36-
--description 'A simple command line tool to access the Prospect One PerfOps API.' \
35+
-n perfops --license ALv2 --vendor ProspectOne -m "PerfOps Support <team@perfops.net>" \
36+
--description "A simple command line tool to access the Prospect One PerfOps API." \
3737
--url https://perfops.net/cli \
3838
release/perfops-linux-amd64=/usr/local/bin/perfops
3939
done

0 commit comments

Comments
 (0)