JuNest versioner #4
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: JuNest Builder | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: "0/5 * * * 0-6" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build | |
if: always() | |
run: | | |
sudo apt update | |
wget -q https://raw.githubusercontent.com/ivan-hc/junest/refs/heads/master/junest-updater.sh | |
chmod a+x ./junest-updater.sh | |
./junest-updater.sh | |
if ! test -f ./.junest/usr/bin/yay; then exit; fi | |
rm -R -f ./*.tar.gz | |
tar -czvf junest-x86_64.tar.gz -C ./.junest/ . | |
mkdir dist | |
mv *tar.gz dist/ | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: junest-x86_64.tar.gz | |
path: 'dist' | |
release: | |
needs: [build] | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: junest-x86_64.tar.gz | |
- name: release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
title: Continuous build | |
automatic_release_tag: continuous | |
prerelease: false | |
draft: false | |
files: | | |
junest-x86_64.tar.gz | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
#Snapshot Release | |
- name: Get Date | |
run: | | |
SNAPSHOT_TAG="$(date '+%Y%m%d%X' | sed 's/://g')" | |
echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}" | |
continue-on-error: false | |
- name: Snapshot Releaser | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "${{ env.SNAPSHOT_TAG}}" | |
tag_name: "${{ env.SNAPSHOT_TAG}}" | |
prerelease: false | |
draft: false | |
generate_release_notes: false | |
make_latest: false | |
files: | | |
junest-x86_64.tar.gz | |
continue-on-error: false |