Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finished release.yml #7

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 4 additions & 79 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ jobs:
GITHUB_TAG="${{ steps.metadata.outputs.github-tag }}"
echo "Plugin version: $PLUGIN_VERSION"
echo "GitHub tag: $GITHUB_TAG"
if [ "v${{ steps.metadata.outputs.github-tag }}" != "vmain" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi

# if [ "v${{ steps.metadata.outputs.github-tag }}" != "vmain" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi

# if [ "v${{ steps.metadata.outputs.plugin-version }}" != "${{ steps.metadata.outputs.github-tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi
# if [ "v${{ steps.metadata.outputs.plugin-version }}" != "${{ steps.metadata.outputs.github-tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi

- name: Package plugin
id: package-plugin
Expand Down Expand Up @@ -172,84 +173,8 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/releases/${{ steps.metadata.outputs.archive }}
asset_name: "Grafana Cost Plugin"
asset_name: "${{ steps.metadata.outputs.archive }}"
tag: ${{ github.ref }}
overwrite: true
body: "Grafann Cost Plugin"


# id: create_release
# uses: actions/create-release@v1
# 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.metadata.outputs.plugin-version }}"
# release_name: Release ${{ github.ref }}
# body: |
# Changes in this Release
# - First Change
# - Second Change
# draft: false
# prerelease: false
# asset_path: ${{ github.workspace }}/releases
# - name: Semantic Release
# uses: cycjimmy/semantic-release-action@v2
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# npm_token: ${{ secrets.NPM_TOKEN }}

# - name: Upload Release Asset
# uses: actions/upload-artifact@v2
# with:
# name: ${{ steps.metadata.outputs.archive }}
# path: ${{ github.workspace }}/releases/${{ steps.metadata.outputs.archive }}




# - name: Create and Push New Branch
# run: |
# cd ${{ github.workspace }}
# pwd
# ls
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# version="${{ steps.metadata.outputs.plugin-version }}"
# branch_name="auto-release-${version}"
# git checkout -b "$branch_name"
# git add ${{ github.workspace }}/releases/${{ steps.metadata.outputs.archive }}
# git add ${{ github.workspace }}/releases/${{ steps.metadata.outputs.archive-checksum }}
# git commit -m "Add plugin zip file - ${version}"
# git push origin "$branch_name"

# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# commit-message: "Add plugin zip file"
# branch: "auto-release-${{ steps.metadata.outputs.plugin-version }}"
# base: main

# - name: Create Github release
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# generate_release_notes: true
# files: |
# ./${{ steps.metadata.outputs.archive }}
# ./${{ steps.metadata.outputs.archive-checksum }}
# body: |
# **This Github draft release has been created for your plugin.**

# _Note: if this is the first release for your plugin please consult the [distributing-your-plugin section](https://github.com/${{github.repository}}/blob/main/README.md#distributing-your-plugin) of the README_

# If you would like to submit this release to Grafana please consider the following steps:

# - Check the Validate plugin step in the [release workflow](https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}}) for any warnings that need attention
# - Navigate to https://grafana.com/auth/sign-in/ to sign into your account
# - Once logged in click **My Plugins** in the admin navigation
# - Click the **Submit Plugin** button
# - Fill in the Plugin Submission form:
# - Paste this [.zip asset link](https://github.com/${{ github.repository }}/releases/download/v${{ steps.metadata.outputs.plugin-version }}/${{ steps.metadata.outputs.archive }}) in the Plugin URL field
# - Paste this [.zip.md5 link](https://github.com/${{ github.repository }}/releases/download/v${{ steps.metadata.outputs.plugin-version }}/${{ steps.metadata.outputs.archive-checksum }}) in the MD5 field

# Once done please remove these instructions and publish this release.
Loading