Skip to content

Expose internal functions #8

Expose internal functions

Expose internal functions #8

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.6
- name: Create GH release
env:
GH_TOKEN: ${{ github.TOKEN }}
run: |
gh release create ${{ github.ref_name }}
build:
needs: [release]
strategy:
matrix:
os: [macos, ubuntu, windows]
runs-on: "${{ matrix.os }}-latest"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.6
- name: build
run: |
go build -o rand-${{ matrix.os }} main.go
- name: Add binary to the release
env:
GH_TOKEN: ${{ github.TOKEN }}
run: |
gh release upload ${{ github.ref_name }} rand-${{ matrix.os }}
docker:
needs: [release]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/nu12/rand:latest,ghcr.io/nu12/rand:${{ github.ref_name }}