Skip to content

Commit

Permalink
Use composite action.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecPablo committed Jul 17, 2023
1 parent e5323ba commit 52c52d0
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions .github/workflows/contract-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ name: 'SC Library - Build Release File'
# **What it does**: Reads the contents of the repo and creates a file listing all relevant smart contracts
# **Why we have it**: To index the smart contracts of the repo for usage with the rest of CLI tooling
# **Who does it impact**: SC Contract Library

on:
release:
types: [published]
permissions:
contents: write
# Needed for the 'trilom/file-changes-action' action
pull-requests: read

# This allows a subsequently queued workflow run to interrupt previous runs
Expand All @@ -21,31 +19,8 @@ jobs:
gen-release:
runs-on: ubuntu-latest
steps:
- name: Get Version Tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout sources
uses: actions/checkout@v3
- id: gen-release
name: 'Generate release.txt'
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Check TARGET_DIRECTORY
run: |
if [ -z "${{ vars.TARGET_DIRECTORY }}" ]
then
echo "TARGET_DIRECTORY=contracts/target/release" >> $GITHUB_ENV
else
echo "TARGET_DIRECTORY=${{ vars.TARGET_DIRECTORY }}" >> $GITHUB_ENV
fi
- name: Generate and push release artifacts
run: |
git config user.name github-actions
git config user.email [email protected]
date > release.txt
find ${{ vars.TARGET_DIRECTORY }} -print >> sclib-release.txt
git add sclib-release.txt
git commit -m "Generate SC lib release file"
git tag ${{ env.RELEASE_VERSION }}+scdist
git push origin ${{ env.RELEASE_VERSION }}+scdist
target-path: 'contracts/programs'

0 comments on commit 52c52d0

Please sign in to comment.