Update nightly.yml #2
Workflow file for this run
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: Nightly Release | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
push: | |
tags: "*" | |
branches: [ "libalpm-test", "dev", "main" ] | |
pull_request: | |
branches: [ "libalpm-test", "dev", "main" ] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
get-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- id: version | |
run: | | |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV" | |
echo "version=${{ env.sha_short }}-${{ env.branch }}" >> $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Packages | |
run: pacman -Syu gcc git base base-devel pkgconf sudo fakeroot cmake make curl --noconfirm --needed | |
- name: Get submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Clean | |
run: make clean | |
- name: Compile | |
run: make CPPFLAGS="-ggdb -mtune=generic -funroll-all-loops -march=native -isystem include -std=c++17" | |
- name: Build release | |
run: tar --zstd -cf tabaur.tar.zst taur | |
- name: Upload to github artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tabaur | |
path: tabaur.tar.zst | |
release: | |
name: Create GitHub Release | |
needs: [build, get-version] | |
runs-on: ubuntu-latest | |
permissions: write-all | |
outputs: | |
release-url: ${{ steps.create-release.outputs.upload_url }} | |
steps: | |
- name: Create Release | |
id: create-release | |
uses: actions/create-release@master | |
with: | |
tag_name: nightly | |
release_name: TabAUR nightly | |
draft: false | |
prerelease: true | |
upload-binaries: | |
name: Upload binaries to Githib relase | |
runs-on: ubuntu-latest | |
needs: [release, get-version] | |
permissions: write-all | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: tabaur | |
- uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ needs.release.outputs.release-url }} | |
asset_path: ./tabaur.tar.zst | |
asset_name: TabAUR-nightly-${{ needs.get-version.outputs.version }}.tar.zst | |
asset_content_type: application/tar+zstd |