Skip to content

Commit

Permalink
Reenable func in create release on branch changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed May 15, 2024
1 parent cfb381c commit 46e2320
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/create-release-on-branch-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,70 +30,70 @@ jobs:
echo "DIST_FILENAME=dist-${RELEASE_BRANCH_SLUGGED}.zip" >> "$GITHUB_ENV"
# Checkout the HEAD of the PR branch to get the latest commit message.
# - uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# - name: Get release description
# run: |
# echo "RELEASE_DESCRIPTION=$(git show -s --format=%s)" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get release description
run: |
echo "RELEASE_DESCRIPTION=$(git show -s --format=%s)" >> "$GITHUB_ENV"
# - uses: actions/checkout@v4
# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version-file: '.nvmrc'
# cache: 'yarn'
# registry-url: 'https://npm.pkg.github.com'
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Install Dependencies
# run: yarn install --frozen-lockfile
- name: Install Dependencies
run: yarn install --frozen-lockfile

# - name: Build artifacts
# run: yarn build
# env:
# VERSION_FILE_NAME: ${{ github.repository }}
# VERSION_FILE_VERSION: ${{ env.BUILD_VERSION }}
- name: Build artifacts
run: yarn build
env:
VERSION_FILE_NAME: ${{ github.repository }}
VERSION_FILE_VERSION: ${{ env.BUILD_VERSION }}

# - name: Zip project
# run: |
# zip -r -j ${{ env.DIST_FILENAME }} dist/
- name: Zip project
run: |
zip -r -j ${{ env.DIST_FILENAME }} dist/
# - name: Delete existing releases
# uses: dev-drprasad/[email protected]
# with:
# tag_name: ${{ env.TAG_NAME }}
# github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete existing releases
uses: dev-drprasad/[email protected]
with:
tag_name: ${{ env.TAG_NAME }}
github_token: ${{ secrets.GITHUB_TOKEN }}


# - name: Create or update tag
# uses: EndBug/[email protected]
# with:
# ref: ${{ env.TAG_NAME }}
- name: Create or update tag
uses: EndBug/[email protected]
with:
ref: ${{ env.TAG_NAME }}

# - name: Create release
# id: create-release
# uses: softprops/action-gh-release@v2
# with:
# target_commitish: ${{ env.RELEASE_SHA }}
# tag_name: ${{ env.TAG_NAME }}
# body: ${{ env.RELEASE_DESCRIPTION }}
# files: ${{ env.DIST_FILENAME }}
- name: Create release
id: create-release
uses: softprops/action-gh-release@v2
with:
target_commitish: ${{ env.RELEASE_SHA }}
tag_name: ${{ env.TAG_NAME }}
body: ${{ env.RELEASE_DESCRIPTION }}
files: ${{ env.DIST_FILENAME }}

- name: Write release information in artifact file
run: |
printf '{
"release_branch": "${{ env.RELEASE_BRANCH }}",
"release_download_url": "https://github.com/reload/poc-dpl-react-pr-trigger/releases/download/${{ env.TAG_NAME }}/${{ env.DIST_FILENAME }}"
"release_download_url": "https://github.com/reload/poc-dpl-react-pr-trigger/releases/download/${{ env.TAG_NAME }}/${{ env.DIST_FILENAME }}",
}' >> release-info.json
- uses: actions/upload-artifact@v3
with:
name: release-info.json
path: ./

# - name: Adding summary
# run: |
# echo "Release created πŸš€πŸ˜Ž at: ${{ steps.create-release.outputs.url }}" >> $GITHUB_STEP_SUMMARY
- name: Adding summary
run: |
echo "Release created πŸš€πŸ˜Ž at: ${{ steps.create-release.outputs.url }}" >> $GITHUB_STEP_SUMMARY

0 comments on commit 46e2320

Please sign in to comment.