-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from bartoval/build_dev
refactor(General): ♻️ Use artifacts
- Loading branch information
Showing
1 changed file
with
16 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,40 @@ | ||
name: build-dev | ||
name: Build and Release Artifact | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v2 | ||
|
||
jobs: | ||
build-and-release: | ||
name: Build and release skupper-console (Dev) | ||
build-and-upload: | ||
name: Build and Upload Artifact | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js ⚙️ | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
cache-path: ~/.cache/yarn | ||
|
||
- name: Set env 📋 | ||
run: echo "RELEASE_VERSION=dev-${GITHUB_SHA}" >> $GITHUB_ENV | ||
|
||
- name: Install 📦 | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build 🚧 | ||
run: | | ||
yarn build --mode development # Assicurati di avere un comando build per l'ambiente dev | ||
env: | ||
CI: false | ||
- name: Build the project | ||
run: yarn build --mode development | ||
|
||
- name: Package 📦 | ||
- name: Package the build into a tarball | ||
run: | | ||
cd build/ && tar -zcvf ../console-dev.tgz --exclude='./data' . # Crea il tarball per la build dev | ||
- name: Create Draft Release ✅ | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: "dev-build" | ||
release_name: "Dev Release" | ||
body: | | ||
Skupper-console (Dev) build is available as a tar ball: | ||
- console-dev.tgz | ||
Issues fixed in this release | ||
- https://github.com/skupperproject/skupper-console/issues?q=is:issue+milestone:dev | ||
draft: true | ||
cd build/ && tar -zcvf ../console-dev.tgz --exclude='./data' . | ||
- name: Upload Release Asset ⬆️ | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload the artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./console-dev.tgz | ||
asset_name: console-dev.tgz | ||
asset_content_type: application/tar+gzip | ||
name: console-dev-artifact | ||
path: ./console-dev.tgz |