v0.19.0 #19
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: Publish Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
cache: 'yarn' | |
- run: yarnpkg --pure-lockfile | |
- run: yarnpkg build | |
- run: yarnpkg lint | |
- run: yarnpkg test | |
publish-binaries: | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, darwin, windows] | |
goarch: [amd64] | |
include: | |
- goos: darwin | |
goarch: arm64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
cache: 'yarn' | |
- run: yarnpkg --pure-lockfile | |
- run: yarnpkg build | |
- uses: wangyoucao577/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
project_path: "./cmd/dsadmin" | |
binary_name: "dsadmin" | |
publish-container: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
cache: 'yarn' | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
# - uses: google/ko@main -> This should replace the 2 lines below, but doesn't seem to work | |
- run: | | |
curl -L https://github.com/google/ko/releases/download/v0.8.3/ko_0.8.3_Linux_x86_64.tar.gz | sudo tar xzf - ko | |
chmod +x ./ko | |
working-directory: | |
/usr/local/bin | |
- run: ko login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }} | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- run: yarnpkg --pure-lockfile | |
- run: yarnpkg build | |
- run: ko publish -B --tags latest --tags ${{ env.RELEASE_VERSION }} ./cmd/dsadmin | |
env: | |
KO_DOCKER_REPO: ghcr.io/remko | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
cache: 'yarn' | |
- run: yarnpkg --pure-lockfile | |
- run: yarnpkg publish --non-interactive | |
env: | |
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |