Skip to content

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
samiraguiar committed Aug 26, 2020
0 parents commit 8c633a1
Show file tree
Hide file tree
Showing 6 changed files with 991 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
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
Loading

0 comments on commit 8c633a1

Please sign in to comment.