Skip to content

Commit

Permalink
update release tag retrieval method
Browse files Browse the repository at this point in the history
  • Loading branch information
Caden-Helbling committed Feb 19, 2024
1 parent b0ab940 commit b224f05
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/larch_to_s3.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: larch to S3

permissions:
id-token: write
contents: read

on:
workflow_dispatch:
push:
Expand All @@ -21,16 +17,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get Release Version
id: get_version
run: |
VERSION=$(curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest" | jq -r .tag_name)
echo "Release version: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Get release tag name
id: get_tag_name
run: echo "RELEASE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

- name: Zip repository
run: |
zip -r "larch_${{ steps.get_version.outputs.version }}.zip" .
zip -r "larch_${RELEASE_TAG}.zip" .
zip -r "larch_latest.zip" .
- name: ConfigureAWS Credentials
Expand All @@ -42,5 +35,5 @@ jobs:

- name: Upload to S3
run: |
aws s3 cp "./larch_${{ steps.get_version.outputs.version }}.zip" s3://impact-repo-dependancies/larch/
aws s3 cp "./larch_${RELEASE_TAG}.zip" s3://impact-repo-dependancies/larch/
aws s3 cp "./larch_latest.zip" s3://impact-repo-dependancies/larch/

0 comments on commit b224f05

Please sign in to comment.