Skip to content

Create readme.md

Create readme.md #1

Workflow file for this run

name: Release on Tag
permissions:
contents: write
on:
push:
tags:
- 'v*' # Match tags starting with 'v'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Make create_deb.sh executable
run: chmod +x create_deb.sh
- name: Set up package_version
id: package_version
run: echo "::set-output name=package_version::$(cat create_deb.sh | grep -oP 'package_version="(\d+\.\d+\.\d+)"' | cut -d'"' -f 2)"
- name: Set environment variables from GitHub Action environment
run: |
export PACKAGE_NAME="aws-sam-cli"
export PACKAGE_VERSION="${{ steps.package_version.outputs.package_version }}"
export PACKAGE_DESCRIPTION="AWS SAM CLI"
export MAINTAINER="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
- name: Run the create_deb.sh script
run: ./create_deb.sh
- name: Create Release
id: create_release
run: |
package_name="aws-sam-cli"
package_version="${{ steps.package_version.outputs.package_version }}"
echo "Creating release for $package_name v$package_version"
# Create a release
release_id=$(gh release create "$package_version" "create_deb.sh" --title "Release $package_name v$package_version")
echo "::set-output name=release_id::$release_id"
- name: Upload Release Asset
run: |
package_name="aws-sam-cli"
package_version="${{ steps.package_version.outputs.package_version }}"
# Upload the .deb package as a release asset
gh release upload "$package_version" "aws-sam-cli-$package_version.deb" --clobber