You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/02/19 01:09:43 UTC
[apisix] branch master updated: ci: add release check (#3521)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 95a149e ci: add release check (#3521)
95a149e is described below
commit 95a149eaa8a335f7563f25414364871d3754b8d9
Author: Shuyang Wu <wo...@gmail.com>
AuthorDate: Fri Feb 19 09:09:33 2021 +0800
ci: add release check (#3521)
---
.github/workflows/build.yml | 28 +++++++++++++++++++++++++++-
.gitignore | 2 +-
Makefile | 20 +++++++++++---------
3 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 760d99c..ae711b8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -2,7 +2,7 @@ name: CI
on:
push:
- branches: [master]
+ branches: [master, 'release/**']
pull_request:
branches: [master]
@@ -53,6 +53,25 @@ jobs:
with:
submodules: recursive
+ - name: Extract branch name
+ id: branch_env
+ shell: bash
+ run: |
+ echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
+ echo "##[set-output name=fullname;]$(echo apache-apisix-${GITHUB_REF##*/}-src.tgz)"
+
+ - name: Create tarball
+ if: ${{ startsWith(github.ref, 'refs/heads/release/') && !endsWith(matrix.os_name, 'luarocks') }}
+ run: |
+ export VERSION=${{ steps.branch_env.outputs.version }}
+ make compress-tar
+
+ - name: Remove source code
+ if: ${{ startsWith(github.ref, 'refs/heads/release/') && !endsWith(matrix.os_name, 'luarocks') }}
+ run: |
+ rm -rf $(ls -1 --ignore=*.tgz --ignore=.travis --ignore=t --ignore=utils --ignore=.github)
+ tar zxvf ${{ steps.branch_env.outputs.fullname }}
+
- name: Linux Get dependencies
run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl
@@ -108,3 +127,10 @@ jobs:
- name: Linux Script
run: sudo ./.travis/${{ matrix.os_name }}_runner.sh script
+
+ - name: Publish Artifact
+ if: ${{ startsWith(github.ref, 'refs/heads/release/') && matrix.os_name == 'linux_openresty' }}
+ uses: actions/upload-artifact@v1
+ with:
+ name: ${{ steps.branch_env.outputs.fullname }}
+ path: ${{ steps.branch_env.outputs.fullname }}
diff --git a/.gitignore b/.gitignore
index dd70e9b..f94b319 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,7 @@ fastcgi_temp
client_body_temp
utils/lj-releng
utils/reindex
-default.etcd/
+*.etcd/
t/lib/dubbo-backend/dubbo-backend-interface/target/
t/lib/dubbo-backend/dubbo-backend-provider/target/
.idea/
diff --git a/Makefile b/Makefile
index 320a214..1b6e982 100644
--- a/Makefile
+++ b/Makefile
@@ -220,7 +220,17 @@ ifeq ("$(wildcard .travis/openwhisk-utilities/scancode/scanCode.py)", "")
endif
.travis/openwhisk-utilities/scancode/scanCode.py --config .travis/ASF-Release.cfg ./
-release-src:
+release-src: compress-tar
+
+ gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
+ shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
+
+ mkdir -p release
+ mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
+ mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
+ mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512
+
+compress-tar:
tar -zcvf $(RELEASE_SRC).tgz \
./apisix \
./bin \
@@ -231,11 +241,3 @@ release-src:
Makefile \
NOTICE \
*.md
-
- gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
- shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
-
- mkdir -p release
- mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
- mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
- mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512