Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
middaysan committed May 20, 2024
1 parent 0ac15e1 commit 46729cc
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,56 @@ jobs:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22.3'
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22.3'

- name: Install dependencies
run: go get -u golang.org/x/sys/windows github.com/getlantern/systray
- name: Install dependencies
run: go get -u golang.org/x/sys/windows github.com/getlantern/systray

- name: Build application
run: go build -ldflags="-H windowsgui -extldflags=-Wl,app.manifest" -o memory-cleaner-tray.exe
- name: Build application
run: go build -ldflags="-H windowsgui" -o memory-cleaner-tray.exe

- name: Archive build
uses: actions/upload-artifact@v2
with:
name: memory-cleaner-tray
path: memory-cleaner-tray.exe
- name: Archive build
uses: actions/upload-artifact@v2
with:
name: memory-cleaner-tray
path: memory-cleaner-tray.exe

release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: memory-cleaner-tray
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: memory-cleaner-tray

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: memory-cleaner-tray.exe
asset_name: memory-cleaner-tray.exe
asset_content_type: application/octet-stream
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: memory-cleaner-tray.exe
asset_name: memory-cleaner-tray.exe
asset_content_type: application/octet-stream

0 comments on commit 46729cc

Please sign in to comment.