File: release.yml

package info (click to toggle)
base16384 2.3.2-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: ansic: 2,190; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: release
on:
  push:
    tags:
      - v*

env:
  GITHUB_TOKEN: ${{ github.token }}

jobs:
  release:
    name: Build on Push Tag 🚀
    runs-on: ubuntu-latest
    steps:

      - name: Checkout Code
        id: checkout
        uses: actions/checkout@v2

      - name: Setup Build Tools
        run: |
          sudo apt-get update
          sudo apt-get install -y gcc git
          wget https://justine.lol/cosmopolitan/cosmopolitan-amalgamation-1.0.zip
          unzip cosmopolitan-amalgamation-1.0.zip

      - name: Build Cosmopolitan
        run: |
          gcc -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
            -fno-omit-frame-pointer -pg -mnop-mcount -D__cosmopolitan \
            -DBASE16384_VERSION=\"`git describe --tags --abbrev=0`\" -DBASE16384_VERSION_DATE=\"`date +"%Y%b/%d"`\"\
            -o base16384.com.dbg base16384.c file.c wrap.c base1432.c -fuse-ld=bfd -Wl,-T,ape.lds \
            -include cosmopolitan.h crt.o ape.o cosmopolitan.a
          objcopy -S -O binary base16384.com.dbg base16384.com

      - name: Upload Binaries to Release
        uses: svenstaro/upload-release-action@v2
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          file: base16384.com
          tag: ${{ github.ref }}
          overwrite: true
          file_glob: true