Skip to content

Add a workflow to release #2

Add a workflow to release

Add a workflow to release #2

Workflow file for this run

name: CI
on:
push:
branches:
- trunk
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
if: github.repository_owner == 'Goooler' && github.ref == 'refs/heads/trunk'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Pack the project
run: zip -r systemless-fcm-hosts.zip . -x "*.git*"
- name: Generate release name with current date
run: echo "RELEASE_NAME=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Delete release if exist then create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view ${{ env.RELEASE_NAME }} && gh release delete ${{ env.RELEASE_NAME }} -y --cleanup-tag
gh release create ${{ env.RELEASE_NAME }} systemless-fcm-hosts.zip -t ${{ env.RELEASE_NAME }} --generate-notes