Skip to content

#1355 🐛bug: fix cache time null #5

#1355 🐛bug: fix cache time null

#1355 🐛bug: fix cache time null #5

Workflow file for this run

name: Release
on:
push:
branches:
- develop
# branches to consider in the event; optional, defaults to all
env:
FILES_DIR: /tmp/paddleflow
permissions:
contents: write
issues: write
pages: write
pull-requests: write
jobs:
release_compile:
strategy:
matrix:
go-version: [1.21.x]
goos: [linux] # 需要打包的系统
goarch: [amd64, arm64] # 需要打包的架构
runs-on: ubuntu-latest
steps:
- name: Install go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install gcc
id: github_context_step
run: |
echo '${{ toJSON(github) }}'
echo '$(uname -m)'
echo '$(uname -s)'
sudo apt-get update
sudo apt-get install -y gcc automake autoconf libtool make gcc-aarch64-linux-gnu
- name: Run build
run: |
go env
make all
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
- name: build python client
run: |
apt-get update && apt-get install -y software-properties-common gcc && \
add-apt-repository -y ppa:deadsnakes/ppa
apt-get update && apt-get install -y python3.8 python3-distutils python3-pip python3-apt
cd client && python3 -m pip install setuptools && python3 setup.py bdist_wheel && cp dist/* ../output/ && cd ..
- name: Packaging
run: tar -zcvf paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz output/
- name: Uploading assets
uses: actions/upload-artifact@v3
with:
name: paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}
path: paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
update_release_draft:
needs: release_compile
strategy:
matrix:
go-version: [1.21.x]
goos: [linux]
goarch: [arm64,amd64]
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- name: create or update a drafter
id: drafter
uses: release-drafter/[email protected]
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
with:
config-name: common/release-drafter.yml
token: ${{ secrets.GITHUB_TOKEN }}
- name: mkdir for download assets
run: |
mkdir ${{ env.FILES_DIR }}
- uses: actions/download-artifact@v3
id: download
with:
name: paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}
path: ${{ env.FILES_DIR }}/paddleflow-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
- name: Display structure of downloaded files
run: ls -lhR
working-directory: ${{ env.FILES_DIR }}
- name: 'Echo download path'
run: echo ${{steps.download.outputs.download-path}}
- name: upload assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "GH_TOKEN is $GITHUB_TOKEN"
j=0
asset_path=${{ env.FILES_DIR }}
cd ${asset_path}
for filename in `ls ${asset_path}`;
do
folder_list[j]=$filename
j=`expr $j + 1`
done
echo "Uploading asset... "
for filepath in ${folder_list[@]};
do
gh release upload ${{ steps.drafter.outputs.tag_name }} ${filepath}/${filepath} --clobber --repo ${{ github.repository }}
done