gl-infra-builder-FUjr/.github/workflows/release.yml
2021-12-22 16:31:38 +08:00

48 lines
1.5 KiB
YAML

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
build:
name: Create Release
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: build
run: |
echo "COMPILE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
cd ~/work/runner-script/sdk4_script && ./build_firmware_by_source $GITHUB_REPOSITORY $GITHUB_WORKSPACE $GITHUB_REF $GITHUB_RUN_ID $GITHUB_ACTOR release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: |
./gl_release_note
draft: false
prerelease: true
- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: ./assets
- name: notify
run: |
echo "send notify"
cd ~/work/runner-script/util && ./send_resease_notify $GITHUB_REPOSITORY $GITHUB_WORKSPACE $GITHUB_REF_NAME $GITHUB_RUN_ID $GITHUB_ACTOR release