Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
edouard-claude committed Jun 15, 2023
1 parent 73ceca4 commit 53f84cc
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
name: Release
name: Release Go project

on:
push:
branches: [master]
tags:
- "*"

jobs:
build-and-release:
name: Build and release
build:
name: GoReleaser build
runs-on: ubuntu-latest

steps:
- name: Check out code
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.20.3
id: go

- name: Get dependencies
run: go mod download

- name: Build
run: go build -o react-go-ssr main.go

- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./react-go-ssr
asset_name: react-go-ssr
asset_content_type: application/octet-stream

0 comments on commit 53f84cc

Please sign in to comment.