Skip to content

some fixes on go package name, trying to deploy to digital ocean #3

some fixes on go package name, trying to deploy to digital ocean

some fixes on go package name, trying to deploy to digital ocean #3

Workflow file for this run

name: Release new version
on:
push:
branches:
- "dev"
jobs:
publish:
runs-on: ubuntu-latest
env:
GOOS: js
GOARCH: wasm
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21.x
cache: true
- name: Build wasm
run: |
go build -o ./web/mykeys.wasm ./cmd/webassembly/main.go
- name: Copy go wasm js engine
run: |
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./web
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Build container image
run: docker build -t ${{ secrets.REGISTRY_NAME }}/mykeys:$(echo $GITHUB_SHA | head -c7) .
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login
- name: Push image to DigitalOcean Container Registry
run: docker push ${{ secrets.REGISTRY_NAME }}/mykeys:$(echo $GITHUB_SHA | head -c7)