Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
A new release is created for each Git tag.
  • Loading branch information
soulim committed Sep 6, 2020
1 parent 8102c48 commit 03f77a9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release a new version
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
release:
name: Upload a release asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare a build
id: prepare-build
env:
GITHUB_REF: ${{ github.ref }}
run: |
version=${GITHUB_REF#refs/tags/v}
zip -r AWS.zip AWS -x "*.DS_Store"
echo "::set-output name=version::${version}"
- name: Create a release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ steps.prepare-build.outputs.version }}
draft: false
prerelease: false
- name: Upload a release asset
id: 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: ./AWS.zip
asset_name: AWS.zip
asset_content_type: application/zip

0 comments on commit 03f77a9

Please sign in to comment.