Skip to content

Commit

Permalink
Update ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
candonov authored Apr 2, 2023
1 parent f2c9c4f commit f10e102
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,18 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: goreleaser
- id: goreleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Debug output file
run: cat goreleaser.yaml

- name: Set output variable
id: set-version
run: |
version=$(grep 'version: ' goreleaser.yml | awk '{ print $2 }')
echo "Found version: $version"
echo "::set-output name=version::$version"

- name: Pass artifact name to next step
id: artifact_name
run: echo "::set-output name=artifact_name::$(echo '${{ steps.goreleaser.outputs.artifacts }}' | jq -r '.[] | select(.type=="Archive").name')"

- name: Debug output variable
run: echo "The release version is ${{ steps.set-version.outputs.version }}"
- name: Use artifact name in next step
run: echo "The artifact name is ${{ steps.artifact_name.outputs.artifact_name }}"

0 comments on commit f10e102

Please sign in to comment.