Skip to content

forgot you need to set up task in gh actions #33

forgot you need to set up task in gh actions

forgot you need to set up task in gh actions #33

Workflow file for this run

name: main
on:
push:
branches: ["main"] # Triggers on pushes to main
tags: ["v*"] # Triggers on any tag with the prefix 'v'
pull_request:
branches: ["main"] # Triggers on pull requests
# Create a strategy matrix and define the runner systems there
jobs:
build:
strategy:
fail-fast: false
matrix:
build:
[
{ name: linux, os: ubuntu-latest },
{ name: windows, os: windows-latest },
]
runs-on: ${{ matrix.build.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.3"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Build
# run: make r system=${{ matrix.build.name }}
- name: Build
run: task build:release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SkyDriver-${{ matrix.build.name }}
path: ./build/SkyDriver${{ matrix.build.name == 'windows' && '.exe' || '' }}
Release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts/
- name: Display structure of downloaded files
run: ls -R
- name: Release asset
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
artifacts/SkyDriver-windows/SkyDriver.exe
artifacts/SkyDriver-linux/SkyDriver
generate_release_notes: true