Skip to content

Commit

Permalink
Upload artifacts to allow passing between jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Jun 22, 2023
1 parent 3d48fe8 commit 3304ca0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
GOOS: windows
GOARCH: amd64

permissions: write-all

steps:
- uses: actions/checkout@v2

Expand All @@ -27,3 +25,11 @@ jobs:

- name: Build
run: go build

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: version
path: |
SMEI.exe
README.md
16 changes: 0 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,3 @@ on:
jobs:
build:
uses: ./.github/workflows/build-base.yml

upload:
name: "Upload artifacts"
runs-on: "ubuntu-latest"

needs: build

permissions: write-all

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

on:
push:
branches:
# - 'main'
- 'auto-prerelease' # TODO change this to main once working

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 3304ca0

Please sign in to comment.