Compatibility fix @ #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: vlang-build-pipeline | |
on: | |
push: | |
branches: [ master, main ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ master, main ] | |
jobs: | |
run: | |
name: Run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up V version latest | |
uses: nocturlab/setup-vlang-action@v1 | |
with: | |
v-version: latest | |
id: v | |
- name: Build app | |
run: v -o vlogql -prod vlogql.v | |
- name: Build canary app | |
run: v -o vlogql-canary -prod vlogql-canary.v | |
- name: Compress Binaries | |
run: upx --lzma --overlay=strip vlogql vlogql-canary | |
- name: Retrieve v.mod version | |
run: | | |
echo TAG_NAME=$(cat v.mod | grep version | awk -F"'" '{print $2}') >> $GITHUB_ENV | |
- name: NFPM DEB | |
if: github.event_name != 'pull_request' | |
uses: skynet-core/nfpm@v1.4 | |
id: deb-package | |
env: | |
VERSION: ${{ env.TAG_NAME }} | |
with: | |
target: vlogql_v${{ env.TAG_NAME }}.deb | |
config: "vlogql.yaml" | |
packager: "deb" | |
- name: NFPM RPM | |
if: github.event_name != 'pull_request' | |
uses: skynet-core/nfpm@v1.4 | |
id: rpm-package | |
env: | |
VERSION: ${{ env.TAG_NAME }} | |
with: | |
target: vlogql_v${{ env.TAG_NAME }}.rpm | |
config: "vlogql.yaml" | |
packager: "rpm" | |
- name: Get Time | |
if: github.event_name != 'pull_request' | |
id: time | |
uses: nanzm/get-time-action@v1.1 | |
with: | |
timeZone: 0 | |
format: 'YYYYMMDDHHmmss' | |
- name: Upload release | |
if: github.event_name != 'pull_request' | |
uses: boxpositron/upload-multiple-releases@1.0.7 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_config: | | |
vlogql | |
vlogql-canary | |
vlogql_v${{ env.TAG_NAME }}.deb | |
vlogql_v${{ env.TAG_NAME }}.rpm | |
tag_name: v${{ steps.time.outputs.time }} | |
release_name: vlogql_v${{ env.TAG_NAME }}_${{ steps.time.outputs.time }} | |
draft: false | |
prerelease: false | |
overwrite: true |