Skip to content

chore(ci): include branch name in filename, tweak conditionals #420

chore(ci): include branch name in filename, tweak conditionals

chore(ci): include branch name in filename, tweak conditionals #420

Workflow file for this run

name: Build Releases
on:
push:
branches:
- 2.10
paths-ignore:
- "**/README.md"
tags:
- v*
pull_request:
branches:
- 2.10
paths-ignore:
- "**/README.md"
workflow_dispatch:
jobs:
build-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate ZIPs
run: |
chmod +x generate.sh
./generate.sh
- name: Compose release filename
run: echo "artifact_name=sdcard-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: |
dist/*
sdcard.json
upload-release:
if: github.event_name != 'pull_request'
needs: build-artifact
runs-on: ubuntu-latest
steps:
- name: Compose release filename
run: echo "artifact_name=sdcard-${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: .
- name: Deploy Latest Release
uses: crowbarmaster/GH-Automatic-Releases@latest
if: github.ref == 'refs/heads/master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest"
files: |
dist/bw212x64.zip
dist/bw128x64.zip
dist/c320x480.zip
dist/c480x272.zip
dist/c480x320.zip
sdcard.json
- name: Auto Create Draft Release
uses: crowbarmaster/GH-Automatic-Releases@latest
if: startsWith(github.event.ref, 'refs/tags/v')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
draft: true
prerelease: false
files: |
dist/bw212x64.zip
dist/bw128x64.zip
dist/c320x480.zip
dist/c480x272.zip
dist/c480x320.zip
sdcard.json