feature: WS-279 updated build for v2 #920
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: Development workflow | |
on: | |
push: | |
branches: | |
- dev | |
- feature/* | |
- release/* | |
env: | |
SLACK_CHANNEL: weos | |
SLACK_USERNAME: WeOS API | |
SLACK_ICON: https://github.com/wepala.png?size=48 | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_FOOTER: copyright 2022 Wepala | |
OAUTH_TEST_KEY: ${{ secrets.OAUTH_TEST_KEY }} | |
jobs: | |
build-api: | |
name: Release Go Binaries | |
outputs: | |
today: ${{ steps.date.outputs.today }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.22.x | |
- name: Run unit tests | |
run: go test -v ./v2/... | |
# - name: Run MySQL end to end tests | |
# run: go test -v -driver=mysql | |
# - name: Run Mysql projections tests | |
# run: go test -v ./projections -driver=mysql | |
# - uses: crazy-max/ghaction-xgo@v1 | |
# name: build linux and mac | |
# with: | |
# xgo_version: latest | |
# go_version: 1.16.x | |
# dest: . | |
# prefix: weos | |
# targets: linux/386,linux/amd64,darwin/amd64,windows/386,windows/amd64 | |
# v: true | |
# x: false | |
# race: false | |
# ldflags: -s -w | |
# buildmode: default | |
# - name: setup app | |
# run: | | |
# #setup go tests | |
# go install github.com/cucumber/godog/cmd/godog@latest | |
# godog -t long | |
# | |
# #setup mac build | |
# mkdir -p build/mac | |
# cp api.yaml build/mac/api.yaml | |
# cp README.md build/mac/README.md | |
# cp LICENSE build/mac/LICENSE | |
# cp NOTICE.txt build/mac/NOTICE.txt | |
# cp weos-darwin-10.16-amd64 build/mac/weos | |
# chmod +x build/mac/weos | |
# tar -czf weos-mac-amd64.tar.gz -C build/mac . | |
# | |
# #setup linux 32 bit build | |
# mkdir -p build/linux32/apps/admin | |
# cp api.yaml build/linux32/api.yaml | |
# cp README.md build/linux32/README.md | |
# cp LICENSE build/linux32/LICENSE | |
# cp NOTICE.txt build/linux32/NOTICE.txt | |
# cp weos-linux-386 build/linux32/weos | |
# chmod +x build/linux32/weos | |
# tar -czf weos-linux-386.tar.gz -C build/linux32 . | |
# | |
# #setup linux 64 bit build | |
# mkdir -p build/linux64/apps/admin | |
# cp api.yaml build/linux64/api.yaml | |
# cp README.md build/linux64/README.md | |
# cp LICENSE build/linux64/LICENSE | |
# cp NOTICE.txt build/linux64/NOTICE.txt | |
# cp weos-linux-amd64 build/linux64/weos | |
# chmod +x build/linux64/weos | |
# tar -czf weos-linux-amd64.tar.gz -C build/linux64 . | |
# | |
# #setup windows 32 bit build | |
# mkdir -p build/win32/apps/admin | |
# cp api.yaml build/win32/api.yaml | |
# cp README.md build/win32/README.md | |
# cp LICENSE build/win32/LICENSE | |
# cp NOTICE.txt build/win32/NOTICE.txt | |
# cp weos-windows-4.0-386.exe build/win32/weos.exe | |
# chmod +x build/win32/weos.exe | |
# cd build/win32 | |
# zip -r ../../weos-win32.zip . | |
# cd ../../ | |
# | |
# #setup windows 64 bit build | |
# mkdir -p build/win64/apps/admin | |
# cp api.yaml build/win64/api.yaml | |
# cp README.md build/win64/README.md | |
# cp LICENSE build/win64/LICENSE | |
# cp NOTICE.txt build/win64/NOTICE.txt | |
# cp weos-windows-4.0-amd64.exe build/win64/weos.exe | |
# chmod +x build/win64/weos.exe | |
# cd build/win64 | |
# zip -r ../../weos-win64.zip . | |
# | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Mac OS | |
# path: weos-mac-amd64.tar.gz | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Linux 32 Bit | |
# path: weos-linux-386.tar.gz | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Linux 64 Bit | |
# path: weos-linux-amd64.tar.gz | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Windows 32 Bit | |
# path: weos-win32.zip | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: Windows 64 bit | |
# path: weos-win64.zip | |
- name: Send release notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: "FFFF00" | |
SLACK_MESSAGE: We were able to create a development build. Get the artifact here https://github.com/wepala/weos/actions/runs/${{ github.run_id }} | |
SLACK_TITLE: WeOS Build Created |