Skip to content

Commit

Permalink
Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
dnorth98 committed Jan 31, 2020
1 parent b9ce140 commit 1e01c39
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: tag-and-release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Get version
id: get_version
run: |
version=$(grep "^version=" aws-connect |cut -f2 -d"=")
echo ::set-output name=version::$version
echo ::set-output name=version_tag::v$version
- name: Tag commit
uses: tvdias/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
tag: "${{steps.get_version.outputs.version_tag}}"

- name: Extract from changelog
id: extract_changes
run: |
# Must use a temporary file or it loses the formatting
VERSION=${{steps.get_version.outputs.version}}; awk "/## \[$VERSION\]/{flag=1;next}/## \[/{flag=0}flag" CHANGELOG.md > REL-BODY.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{steps.get_version.outputs.version_tag}}
artifacts: "*.gem, CHANGELOG.md"
bodyFile: "REL-BODY.md"
token: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CHANGELOG

## [1.0.5]

- added github action to release

## [1.0.4]

- Added version flag

## [1.0.3]

- Moved session manager check

## [1.0.2]

- Check for AWS CLI version
- Install session manager plugin if not present

## [1.0.1]

- Fixed session manager plugin check

## [1.0.0]

- Inital release
2 changes: 1 addition & 1 deletion aws-connect
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Wrapper around AWS session manager for instance access and SSH tunnels

programname=$0
version=1.0.4
version=1.0.5

# Defaults
action=ssh
Expand Down

0 comments on commit 1e01c39

Please sign in to comment.