Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ravijrahb committed Mar 7, 2024
2 parents 4770675 + 878adc3 commit ccb79dd
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release WordPress Plugin

on:
push:
tags:
- 'v*'

jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Zip WordPress Plugin Folder
run: zip -r Timeline-WP-${{ github.ref_name }}.zip ./Timeline-WP/

- name: Upload Plugin Zip as artifact
uses: actions/upload-artifact@v2
with:
name: Timeline-WP-${{ github.ref_name }}
path: ./Timeline-WP-${{ github.ref_name }}.zip

create-release:
needs: [prepare-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Download Plugin Zip artifact
uses: actions/download-artifact@v2
with:
name: Timeline-WP-${{ github.ref_name }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Timeline-WP ${{ github.ref_name }}
draft: true
prerelease: true

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Timeline-WP-${{ github.ref_name }}.zip
asset_name: Timeline-WP-${{ github.ref_name }}.zip
asset_content_type: application/zip

0 comments on commit ccb79dd

Please sign in to comment.