Merge pull request #1 from M-archand/main #24
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: build | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
jobs: | |
zip-n-push: | |
name: Zip and Push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install GitHub CLI | |
run: sudo apt-get install -y gh | |
- name: Set Variables | |
run: echo "REPO_NAME=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_ENV | |
- name: Zip Folder | |
run: | | |
zip -r ${{ env.REPO_NAME }}.zip ${{ env.REPO_NAME }} -x ".git/*" ".github/*" | |
- name: Upload Zip as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: project-zip | |
path: ${{ env.REPO_NAME }}.zip | |
- name: Create Draft Release | |
id: create_release | |
run: | | |
gh release create "${{ github.ref }}" ${{ env.REPO_NAME }}.zip --title "Build" --notes "Latest Release." --draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Assets to Release | |
run: | | |
gh release upload "${{ github.ref }}" ${{ env.REPO_NAME }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |