Skip to content

Commit

Permalink
Update the BUILD.YAML file
Browse files Browse the repository at this point in the history
  • Loading branch information
Apurva14A committed Oct 26, 2023
1 parent cd8de03 commit 4c59f17
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,52 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- run: mvn clean package
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.war staging

# - name: upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: onlinebookstore
# path: staging
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: onlinebookstore
path: staging

# release-project:
# name: Release Project
# runs-on: ubuntu-latest
# needs: build-project
release-project:
name: Release Project
runs-on: ubuntu-latest
needs: build-project

# steps:
# - name: download artifacts
# uses: actions/download-artifact@v3
# with:
# name: onlinebookstore
# path: staging
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
name: onlinebookstore
path: staging

# - name: Test the arifacts
# run: ls -R
- name: Test the arifacts
run: ls -R

# - name: archieve artifacts
# uses: thedoctor0/[email protected]
# with:
# type: 'zip'
# filename: 'onlinebookstore.zip'
- name: archieve artifacts
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'onlinebookstore.zip'

# - name: Create a release
# id: create-new-release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.run_number}}
# release_name: Release ${{ github.run_number }}
- name: Create a release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number}}
release_name: Release ${{ github.run_number }}

# - name: Upload Release asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create-new-release.outputs.upload_url }}
# asset_path: onlinebookstore.zip
# asset_name: onlinebookstore-v${{ github.run_number }}.zip
# asset_content_type: application/zip
- name: Upload Release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: onlinebookstore.zip
asset_name: onlinebookstore-v${{ github.run_number }}.zip
asset_content_type: application/zip

0 comments on commit 4c59f17

Please sign in to comment.