Skip to content

Commit

Permalink
Release action added
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Jul 1, 2021
1 parent a3c653d commit 0c9dda0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Packaging and Releasing the Tools-oss-cad-suite apio package

name: Release

# Manual activation
on: [workflow_dispatch]

jobs:

# -- Building Linux_x86_64
# -- It creates the package tools-oss-cad-suite-linux-x64-20210627.tar.gz
build-Linux_x86_64:

runs-on: ubuntu-20.04

steps:
# -- Checkout the repo
- name: Checkout!
uses: actions/checkout@v2

# -- Execute the build script
- name: Run build Script (Linux_x86_x64)
run: |
./build.sh linux_x64
version=$(cat VERSION)
echo "VERSION: $version"
echo "VERSION=$version" >> $GITHUB_ENV
#-- Create the Release
- name: Create the Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: v${{ env.VERSION }}
body: |
A new release
draft: false
prerelease: false

- name: Upload Linux_64 Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: _packages/build_linux_x86_64/tools-oss-cad-suite-linux_x86_64-${{ env.VERSION }}.tar.gz
asset_name: tools-oss-cad-suite-linux_x86_64-${{ env.VERSION }}.tar.gz
asset_content_type: application/tar+gzip
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ PACKAGE_JSON="$PACKAGE_DIR"/"$ARCH"/package.json
cp -r "$WORK_DIR"/build-data/templates/package-template.json $PACKAGE_JSON
echo "ARCH: $ARCH"
if [ "$ARCH" == "linux-x64" ]; then
echo "HOOOOOLI!!!!"
sed -i "s/%VERSION%/\"$VERSION\"/;" "$PACKAGE_DIR"/"$ARCH"/package.json
sed -i "s/%SYSTEM%/\"linux_x86_64\"/;" "$PACKAGE_DIR"/"$ARCH"/package.json
fi
Expand Down

0 comments on commit 0c9dda0

Please sign in to comment.