Check for Release #12
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
name: Check for Release | |
on: | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
check-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Install Dependencies | |
run: npm install | |
- name: Check for Release | |
id: get-release | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
owner: Snowflake-Labs | |
repo: terraform-provider-snowflake | |
excludes: prerelease, draft | |
- name: Get Your Repository's Version | |
id: get-version | |
run: | | |
cat src/snowflake_resources/snowflake_provider.ts # Check file contents | |
version=$(grep -oE 'version: "[0-9]+\.[0-9]+\.[0-9]+"' src/snowflake_resources/snowflake_provider.ts | awk -F'"' '{print $2}') | |
echo "Extracted Version: $version" | |
echo "::set-output name=MY_VERSION::$version" | |
shell: bash | |
- name: Print Release Info | |
run: | | |
echo "Release Name: ${{ steps.get-release.outputs.release }}" |