Modify the publishing process
This commit is contained in:
parent
15ccade3d3
commit
4a77548b23
1 changed files with 49 additions and 48 deletions
97
.github/workflows/casa.yml
vendored
97
.github/workflows/casa.yml
vendored
|
@ -40,32 +40,35 @@ jobs:
|
||||||
# env:
|
# env:
|
||||||
# GITHUB_TOKEN: ${{ github.token }}
|
# GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
- name: Initialization environment
|
with:
|
||||||
env:
|
fetch-depth: 0
|
||||||
DEBIAN_FRONTEND: noninteractive
|
submodules: true
|
||||||
run: |
|
# - name: Initialization environment
|
||||||
sudo timedatectl set-timezone "$TZ"
|
# env:
|
||||||
sudo mkdir -p /workdir
|
# DEBIAN_FRONTEND: noninteractive
|
||||||
sudo chown $USER:$GROUPS /workdir
|
# run: |
|
||||||
|
# sudo timedatectl set-timezone "$TZ"
|
||||||
|
# sudo mkdir -p /workdir
|
||||||
|
# sudo chown $USER:$GROUPS /workdir
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Clone source code
|
# - name: Clone source code
|
||||||
working-directory: /workdir
|
# working-directory: /workdir
|
||||||
run: |
|
# run: |
|
||||||
df -hT $PWD
|
# df -hT $PWD
|
||||||
git clone $REPO_URL -b $REPO_BRANCH --recursive casa
|
# git clone $REPO_URL -b $REPO_BRANCH --recursive casa
|
||||||
ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
|
# ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
|
||||||
ls
|
# ls
|
||||||
|
|
||||||
|
|
||||||
- name: Set enviroment for github-release
|
- name: Set enviroment for github-release
|
||||||
run: |
|
run: |
|
||||||
echo "VERSION=$(cat /workdir/casa/types/system.go | grep CURRENTVERSION | awk '$2 == "CURRENTVERSION"{print $4}' | sed 's/"//g')" >>$GITHUB_ENV
|
echo "VERSION=$(cat types/system.go | grep CURRENTVERSION | awk '$2 == "CURRENTVERSION"{print $4}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||||
echo "BODY=$(cat /workdir/casa/types/system.go | grep BODY | awk -F= '{print $2}' | sed 's/"//g')" >>$GITHUB_ENV
|
echo "BODY=$(cat types/system.go | grep BODY | awk -F= '{print $2}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,36 +77,35 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
# - name: Build frontend with nodejs and yarn
|
# - name: Build frontend with nodejs and yarn
|
||||||
# run: |
|
# run: |
|
||||||
# cd casa/UI
|
# cd casa/UI
|
||||||
# ls
|
# ls
|
||||||
# yarn install
|
# yarn install
|
||||||
# yarn build
|
# yarn build
|
||||||
|
|
||||||
- name: list work
|
- name: list work
|
||||||
run: pwd
|
run: pwd
|
||||||
|
|
||||||
# - name: Build with xgo
|
# - name: Build with xgo
|
||||||
# uses: crazy-max/ghaction-xgo@v1
|
# uses: crazy-max/ghaction-xgo@v1
|
||||||
# with:
|
# with:
|
||||||
# working_dir: /workdir/casa
|
# xgo_version: latest
|
||||||
# xgo_version: latest
|
# go_version: ${{ matrix.go_version }}
|
||||||
# go_version: ${{ matrix.go_version }}
|
# dest: build
|
||||||
# dest: build
|
# prefix: casa
|
||||||
# prefix: casa
|
# targets: linux/amd64,linux/arm64
|
||||||
# targets: linux/amd64,linux/arm64
|
# v: true
|
||||||
# v: true
|
# x: false
|
||||||
# x: false
|
# race: false
|
||||||
# race: false
|
# ldflags: -s -w
|
||||||
# ldflags: -s -w
|
# buildmode: default
|
||||||
# buildmode: default
|
|
||||||
|
|
||||||
- name: List Files
|
- name: List Files
|
||||||
run: |
|
run: |
|
||||||
ls
|
ls
|
||||||
mkdir -p casa/build
|
mkdir build
|
||||||
cd casa/build
|
cd build
|
||||||
touch casa-linux-amd64
|
touch casa-linux-amd64
|
||||||
touch casa-linux-arm64
|
touch casa-linux-arm64
|
||||||
ls
|
ls
|
||||||
|
@ -111,26 +113,25 @@ jobs:
|
||||||
|
|
||||||
- name: Pack builds
|
- name: Pack builds
|
||||||
run: |
|
run: |
|
||||||
cd /workdir
|
|
||||||
wget $PACK_SH_URL
|
wget $PACK_SH_URL
|
||||||
chmod +x $PACK_SH
|
chmod +x $PACK_SH
|
||||||
./$PACK_SH $(pwd)
|
./$PACK_SH
|
||||||
echo "::set-output name=status::success"
|
echo "::set-output name=status::success"
|
||||||
- name: list work
|
- name: list work
|
||||||
run: ls
|
run: ls
|
||||||
|
|
||||||
# - name: move
|
# - name: move
|
||||||
# run: |
|
# run: |
|
||||||
# ls
|
# ls
|
||||||
# mv /workdir/casa/upload/linux-amd64-casaos.tar.gz ./linux-amd64-casaos.tar.gz
|
# mv /workdir/casa/upload/linux-amd64-casaos.tar.gz ./linux-amd64-casaos.tar.gz
|
||||||
# mv /workdir/casa/upload/linux-arm64-casaos.tar.gz ./linux-arm64-casaos.tar.gz
|
# mv /workdir/casa/upload/linux-arm64-casaos.tar.gz ./linux-arm64-casaos.tar.gz
|
||||||
- name: Update release
|
- name: Update release
|
||||||
uses: meeDamian/github-release@2.0
|
uses: meeDamian/github-release@2.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: >
|
files: >
|
||||||
casa/linux-amd64-casaos.tar.gz
|
linux-amd64-casaos.tar.gz
|
||||||
casa/linux-arm64-casaos.tar.gz
|
linux-arm64-casaos.tar.gz
|
||||||
tag: v${{ env.VERSION }}
|
tag: v${{ env.VERSION }}
|
||||||
body: >
|
body: >
|
||||||
${{ env.BODY }}
|
${{ env.BODY }}
|
||||||
|
|
Loading…
Reference in a new issue