Automatic release GitHub with version
For having releases published automatically on Github , I use this tagged release.yml file as an workflow
name: “tagged-release”
on:
push:
tags:
– “v*”
jobs:
build:
runs-on: ubuntu-latest
steps:
– name: ‘Checkout Github Action’
uses: actions/checkout@master
# code to build the source
– name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: nameOfTheApp
path: ‘src/…/*’
retention-days: 1
– name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: ‘zip’
filename: ‘nameOfTheApp.zip’
path: ‘${{github.workspace}}/src/…’
exclusions: ‘*.git* /*node_modules/* .editorconfig’
– name: Release
uses: softprops/action-gh-release@v1
with:
files: |
nameOfTheApp.zip
– name: delete older-releases@v0
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
#repo:
keep_latest: 2
#delete_tag_pattern: beta # defaults to “”
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Leave a Reply