From 92a10f32e9869a83a063a50df7e5d8018881a768 Mon Sep 17 00:00:00 2001 From: saicharan0112 Date: Sun, 30 Oct 2022 22:54:43 +0530 Subject: Initial commit of eSim auto packaging --- .github/workflows/release_ubuntu.yml | 115 +++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .github/workflows/release_ubuntu.yml diff --git a/.github/workflows/release_ubuntu.yml b/.github/workflows/release_ubuntu.yml new file mode 100644 index 00000000..0e5df9db --- /dev/null +++ b/.github/workflows/release_ubuntu.yml @@ -0,0 +1,115 @@ +#This flow will build the latest docker image, test the OpenFASOC flow in it and if it works, update the readme file and push it to the docker hub for reference + +name: Auto release of eSim for Ubuntu OS + +on: + push: + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + workflow_dispatch: + + +jobs: + release_eSim: + runs-on: ubuntu-latest + steps: + +# Create eSim release directory + - name: Preparing eSim for release + run: mkdir /home/runner/work/eSim_release + +# Steps to prepare nghld.zip + + - name: Preparing nghdl for release + run: mkdir /home/runner/work/nghdl_release + + - name: Checkout FOSSEE/nghdl installers branch + uses: actions/checkout@v3 + with: + repository: FOSSEE/nghdl + ref: installers + + - name: Get required data from the nghld/installers branch + run: | + cp Ubuntu/ghdl-*.tar.xz /home/runner/work/nghdl_release/. + cp Ubuntu/verilator-*.tar.xz /home/runner/work/nghdl_release/. + cp Ubuntu/install-nghdl.sh /home/runner/work/nghdl_release/. + + - name: Checkout FOSSEE/nghdl installers branch + uses: actions/checkout@v3 + with: + repository: FOSSEE/nghdl + ref: master + + - name: Get required data from the nghld/master branch + run: | + cp -rf ./* /home/runner/work/nghdl_release/. + cd /home/runner/work + rm -rf nghdl_release/.git* nghdl_release/*.md + + - name: Compress the nghdl folder and copy it to eSim release folder + run: | + zip -r nghld.zip . -i nghdl_release/. + cp nghld.zip /home/runner/work/eSim_release/. + tree /home/runner/work/ + +# Steps to prepare eSim release directory + + - name: Checkout FOSSEE/eSim master branch + uses: actions/checkout@v3 + with: + repository: FOSSEE/eSim + ref: master + + - name: Compress the library/kicadLibrary folder + run: | + tar cfJ kicadLibrary.tar.xz library/kicadLibrary/. + cp kicadLibrary.tar.xz /home/runner/work/eSim_release/. + + - name: Copy all the data from eSim/master to eSim_release and delete specific data + run: | + rm -rf .git* code library/browser/User-Manual/figures + rm conf.py setup.py index.rst requirements.txt .travis.yml library/browser/User-Manual/eSim.html + cp -rf ./* /home/runner/work/eSim_release/. + + - name: Checkout FOSSEE/eSim installers branch + uses: actions/checkout@v3 + with: + repository: FOSSEE/eSim + ref: installers + + - name: Copy install-eSim.sh script to the release directory + run: | + cp Ubuntu/install-eSim.sh /home/runner/work/eSim_release/. + + - name: Zip the eSim_release folder + run: | + cd /home/runner/work/ + zip -r eSim_release.zip eSim_release/ + ls eSim_release.zip + tree -L 3 + +# Create a release and upload artifact + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: test_tag + release_name: Release test_tag + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./eSim_release.zip + asset_name: eSim_release.zip + asset_content_type: application/zip + + -- cgit