-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
ea80a4a
commit 2cb2647
Showing
3 changed files
with
73 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- run: npm ci | ||
|
||
- run: npm run build | ||
|
||
# @see https://github.com/actions/create-release/issues/38#issuecomment-715327220 | ||
- name: Prepare the changelog from the tag message | ||
id: prepare_changelog | ||
run: | | ||
# Parse tag message | ||
CHANGELOG=$(git tag -l --format='%(contents)' $GITHUB_REF | tail -n+3) | ||
# Set markdown titles | ||
CHANGELOG=${CHANGELOG/Added/## Added} | ||
CHANGELOG=${CHANGELOG/Fixed/## Fixed} | ||
CHANGELOG=${CHANGELOG/Changed/## Changed} | ||
CHANGELOG=${CHANGELOG/Removed/## Removed} | ||
CHANGELOG=${CHANGELOG/Deprecated/## Deprecated} | ||
CHANGELOG=${CHANGELOG/Security/## Security} | ||
# Remove PGP signature | ||
CHANGELOG="${CHANGELOG%-----BEGIN*}" | ||
echo 'changelog<<EOF' >> $GITHUB_ENV | ||
echo $CHANGELOG >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
# @see https://github.com/actions/create-release | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: v${{ github.ref }} | ||
body: ${{ env.GITHUB_ENV.changelog }} | ||
draft: false | ||
prerelease: false | ||
|
||
# @see https://github.com/actions/upload-release-asset | ||
- name: Upload 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: ./alfred-jira-search.alfredworkflow | ||
asset_name: alfred-jira-search.alfredworkflow | ||
asset_content_type: application/zip | ||
|
||
# @see https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
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 |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# TODO | ||
|
||
## Build | ||
|
||
Build the alfred workflow file on release and attach it to the Github release. | ||
|
||
## Config | ||
|
||
Test config by connecting to the API. |