Skip to content

add env

add env #55

Workflow file for this run

name: Build
on:
push:
branches:
- main
- add-jetson-action
tags:
- '*'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install git make wget gcc libevent-dev libcsfml-dev file g++ cpio unzip rsync bc bzip2
./build.sh x86
- name: Upload binary
uses: actions/upload-artifact@v4
with:
path: |
msposd_x86
- name: Versioned release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
msposd_x86
- name: Delete existing latest release
if: github.ref == 'refs/heads/add-jetson-action' && github.event_name == 'push'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/releases/latest
- name: Upload latest
if: github.ref == 'refs/heads/add-jetson-action' && github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
tag_name: latest
body: "Latest main build"
make_latest: true
files: |
msposd_x86