Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/auto-prerelease' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Feyko committed Mar 23, 2024
2 parents 9428924 + 6e8b9d2 commit c6cf7cd
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 29 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "build"

on:
workflow_call:

jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"

env:
GOOS: windows
GOARCH: amd64

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: Verify dependencies
run: go mod verify

- name: Build
run: go build

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: version
path: |
SMEI.exe
README.md
30 changes: 1 addition & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,4 @@ on:

jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"

env:
GOOS: windows
GOARCH: amd64

permissions: write-all

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: Verify dependencies
run: go mod verify

- name: Build
run: go build

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: executable
path: |
SMEI.exe
uses: ./.github/workflows/build-base.yml
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "release"

on:
push:
branches:
- 'main'

jobs:
build:
uses: ./.github/workflows/build-base.yml

release:
name: "Release"
runs-on: "ubuntu-latest"

needs: build

permissions: write-all

steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: version

- uses: "marvinpinto/action-automatic-releases@latest"
name: Create prerelease
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Automatic Pre-Release"
files: |
README.md
SMEI.exe

0 comments on commit c6cf7cd

Please sign in to comment.