Skip to content

Commit

Permalink
💚 improve workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
Rintaro Okamura committed Jul 21, 2020
1 parent 4d0334c commit dc9d629
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ jobs:
steps:
- name: Install dependencies
run: |
echo "Install dependencies"
sudo apt-get update
sudo apt-get install -y libprotobuf-dev libprotoc-dev protobuf-compiler
- name: Install grpc-java
run: |
echo "Install gRPC-Java"
sudo apt-get install -y autoconf libtool
mkdir -p $HOME/protobuf
curl -L https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz | tar xvz --strip-components=1 -C $HOME/protobuf
Expand All @@ -38,27 +36,33 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- run: |
echo "checkout master"
- name: checkout master
run: |
git checkout master
- run: |
echo "build"
- name: build
run: |
export GOPATH=$HOME/go
export PATH=$HOME/grpc-java:$PATH
make vald
make all
make vald/sha/update
make vald/client/java/version/update
rm -rf vald
- run: |
echo "commit and push"
- name: commit and push
run: |
sha=`make vald/sha/print`
git config --global user.name 'VDaaS org'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add .
git commit -m "[skip ci] Update [vald sha: ${sha}]"
git push
- name: tag
continue-on-error: true
run: |
version=`make vald/client/java/version/print`
git tag ${version}
git push --tags
- name: prepare for publish
run: |
./gradlew clean
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
push:
tags:
- '*.*.*'
- 'v*.*.*'
- '*.*.*-*'
- 'v*.*.*-*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create release
if: startsWith( github.ref, 'refs/tags/')
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit dc9d629

Please sign in to comment.