energy build and package #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Energy Build and Package Windows | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
windows-64: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ windows-2019 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20' | |
# 创建基础环境目录 | |
- name: Config Base Environment | |
run: | | |
mkdir D:/app | |
mkdir D:/app/install | |
shell: bash | |
# 安装 energy cli | |
- name: Install ENERGY CLI | |
run: | | |
cd D:/app | |
git clone https://github.com/energye/energy.git | |
cd energy/cmd/energy | |
go install | |
energy cli -v | |
shell: bash | |
# windows 64 安装开发环境 | |
- name: Install ENERGY CEF 109-64 | |
run: | | |
cd D:/app | |
energy install --all --cef=109 | |
energy env | |
shell: bash | |
# 编译和打包 | |
- name: Build and Package AMD64 | |
run: | | |
cd $RUNNER_WORKSPACE/demo-actions | |
energy build -o="demo-amd64.exe" | |
energy package -f="demo-amd64.exe" -o="demo-windows64.exe" -c | |
mv "$RUNNER_WORKSPACE/demo-actions/build/windows/demo-windows64.exe" D:/app/install | |
shell: bash | |
# windows 32 安装开发环境 | |
- name: Install ENERGY CEF 109-32 | |
run: | | |
cd D:/app | |
energy install --all --cef=109 --arch=386 | |
energy env | |
shell: bash | |
# 编译和打包 | |
- name: Build and Package 32 | |
run: | | |
cd $RUNNER_WORKSPACE/demo-actions | |
energy build -o="demo-32.exe" --arch="386" | |
energy package -f="demo-32.exe" -o="demo-windows32.exe" -c | |
mv "$RUNNER_WORKSPACE/demo-actions/build/windows/demo-windows32.exe" D:/app/install | |
shell: bash | |
- name: Build and Package END | |
run: | | |
ls -al D:/app/install/ | |
shell: bash | |
- name: Release Dynamic library | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: D:/app/install/** | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |