Simple command to check if you are within ISS visibility range
1
2name: Build and upload a binary on tag push
3on:
4 push:
5 tags:
6 - 'v*'
7
8jobs:
9 build-release:
10 runs-on: docker
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v3
14 - name: Setup toolchian
15 uses: https://github.com/dtolnay/rust-toolchain@stable
16 - name: Build
17 run: |
18 export BIN_NAME="iss_locator"
19 export VER=$(awk -F "=" '/version/ {print $2}' Cargo.toml | grep -o -e '[0-9]*\.[0-9]*\.[0-9]*')
20 cargo build --release
21 mkdir release
22 cp target/release/$BIN_NAME release/$BIN_NAME-$VER
23 chmod +x release/$BIN_NAME-$VER
24 xz --keep -9 release/$BIN_NAME-$VER
25 shasum -a 256 release/$BIN_NAME-$VER > release/$BIN_NAME-$VER.sha256
26 shasum -a 256 release/$BIN_NAME-$VER.xz > release/$BIN_NAME-$VER.xz.sha256
27 - name: Upload release
28 uses: actions/forgejo-release@v1
29 with:
30 direction: upload
31 url: https://git.technoduck.me
32 token: ${{secrets.app_token}}
33 release-dir: release
34 verbose: true
35
36