Skip to content

Commit

Permalink
actions: separado cachix do build de binários
Browse files Browse the repository at this point in the history
Signed-off-by: lucasew <[email protected]>
  • Loading branch information
lucasew committed Nov 20, 2020
1 parent 576378b commit 9d25277
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Autorelease

on:
push:
branches:
- master
jobs:
build-binary:
runs-on: ubuntu-latest
steps:
- name: Create relase
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.15.5'

- run: mkdir build -p && ls && pwd
- run: GOOS=windows GOARCH=amd64 go build -o build/dotenv-windows-amd64.exe ./cmd/dotenv/main.go
- run: go build -o build/dotenv-linux-amd64 ./cmd/dotenv/main.go
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/dotenv-*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
30 changes: 1 addition & 29 deletions .github/workflows/main.yml → .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# This is a basic workflow to help you get started with Actions

name: CI
name: Cachix

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
Expand Down Expand Up @@ -29,31 +28,4 @@ jobs:
name: lucasew-github
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build
build-binary:
runs-on: ubuntu-latest
steps:
- name: Create relase
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.15.5'

- run: mkdir build -p && ls && pwd
- run: GOOS=windows GOARCH=amd64 go build -o build/dotenv-windows-amd64.exe ./cmd/dotenv/main.go
- run: go build -o build/dotenv-linux-amd64 ./cmd/dotenv/main.go
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/dotenv-*
tag: ${{ github.ref }}
overwrite: true
file_glob: true

0 comments on commit 9d25277

Please sign in to comment.