Develop (#251) #52
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: Build and Deploy | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
branches: | |
- main | |
env: | |
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUBTOKEN }} | |
TRAVIS_BUILD_NUMBER: ${{ github.run_number }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
GITHUB_TOKEN: ${{ github.token }} | |
jobs: | |
build: | |
name: Build_Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
env: | |
RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.0 | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Prepary deps | |
run: | | |
echo -e "machine github.com\n login ${{ secrets.GITHUBTOKEN }}" > ~/.netrc | |
make get_deps | |
- name: Build all | |
id: build-all | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: make all | |
- name: Deploy docker image | |
id: deploy-docker | |
run: make deploy | |
- name: upload server linux amd64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-linux-amd64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload server linux arm 7 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-linux-arm-7 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload server linux arm 6 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-linux-arm-6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload server linux arm 5 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-linux-arm-5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload server darwin amd64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-darwin-10.6-amd64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload server darwin arm64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/server-darwin-10.6-arm64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload cli darwin arm64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/cli-darwin-10.6-arm64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload cli darwin amd64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/cli-darwin-10.6-amd64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload cli linux amd64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/cli-linux-amd64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload cli linux amd64 artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/cli-linux-amd64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload common artifact | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /home/runner/work/smart-home/smart-home/smart-home-common.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |