From ace518676ddb82158428cd854c513d6a45ba6546 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Thu, 2 Feb 2023 16:36:02 +0530 Subject: [PATCH] fix: added release workflow --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ LICENSE | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..171c6ac --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "16.x" + - run: npm install + + - name: get-package-details + id: package + uses: codex-team/action-nodejs-package-info@v1.1 + - name: install npm packall + run: npm install npm-pack-all + + - run: node node_modules/.bin/npm-pack-all + - uses: Klemensas/action-autotag@stable + id: update_tag + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + tag_prefix: "v" + - name: Create Release + if: steps.update_tag.outputs.tagname + uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.update_tag.outputs.tagname }} + release_name: Release ${{ steps.update_tag.outputs.tagname }} + draft: false # Default value, but nice to set explicitly + prerelease: false # Default value, but nice to set explicitly + - name: Upload Release Asset + if: steps.update_tag.outputs.tagname + 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 its 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: ./${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz + asset_name: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz + asset_content_type: application/tgz \ No newline at end of file diff --git a/LICENSE b/LICENSE index a675f01..a48530c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Contentstack +Copyright (c) 2023 Contentstack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal