Skip to content

增加创建虚拟机操作步骤文档 #27

增加创建虚拟机操作步骤文档

增加创建虚拟机操作步骤文档 #27

Workflow file for this run

name: hamster-provider
on:
push:
branches:
- develop
- main
- feature/version
jobs:
release-build:
strategy:
matrix:
platform: [ windows-latest, macos-latest,ubuntu-latest ]
go-version: [ 1.19 ]
node-version: [18]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.REGISTRY_USERNAME }}
# password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: build frontend
run: |
cd frontend && yarn && yarn build
- name: build binary
run: go build -o build/bin
- name: MacOS download gon for code signing and app notarization
if: matrix.platform == 'macos-latest'
run: |
brew install mitchellh/gon/gon
- name: Import Code-Signing Certificates for macOS
if: matrix.platform == 'macos-latest'
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Sign our macOS binary
if: matrix.platform == 'macos-latest'
run: |
echo "Signing Package"
gon -log-level=info ./build/darwin/gon-sign.json
env:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- name: upload artifacts macOS
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: hamster-provider-macos
path: |
hamster-provider.dmg
- name: upload artifacts windows
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: hamster-provider-windows
path: |
build/bin/hamster-provider.exe
- name: upload artifacts windows
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: hamster-provider-linux
path: |
build/bin/hamster-provider