-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8c633a1
Showing
6 changed files
with
991 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
# `github.ref` is in the form /refs/tags/vx.x.x so we need to extract the tagname | ||
# to correctly fill asset_name (which will be the actual name for downloaded files) | ||
- name: Set variables | ||
id: vars | ||
run: | | ||
echo "::set-output name=product::NoteReply-${GITHUB_REF/refs\/tags\/v/}" | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build packages | ||
id: build_packages | ||
# before creating the archives, make sure to exclude the files we don't want. | ||
# however, leave .gitattributes uncommitted -- we want these files present in | ||
# the "source" packages generated by github when we create a tag | ||
run: | | ||
echo ".github export-ignore" >> .gitattributes | ||
git archive --worktree-attributes --format tar.gz --prefix ${{ steps.vars.outputs.product }}/ -o ./NoteReply.tar.gz ${{ github.ref }} | ||
git archive --worktree-attributes --format zip --prefix ${{ steps.vars.outputs.product }}/ -o ./NoteReply.zip ${{ github.ref }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Tarball | ||
id: upload-release-tarball | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./NoteReply.tar.gz | ||
asset_name: ${{ steps.vars.outputs.product }}.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload Release Zip | ||
id: upload-release-zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./NoteReply.zip | ||
asset_name: ${{ steps.vars.outputs.product }}.zip | ||
asset_content_type: application/zip |
Oops, something went wrong.