Skip to content

Update manifest file to include snapshots, change default ipfs gatewa… #84

Update manifest file to include snapshots, change default ipfs gatewa…

Update manifest file to include snapshots, change default ipfs gatewa… #84

# This is a basic workflow to help you get started with Actions
name: Draft Releaser
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions: write-all
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Check package versions
run: |
PACKAGE_VERSION=`jq -r .version package.json`
RELEASE_VERSION=`curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")'`
echo Package.json version: v$PACKAGE_VERSION
echo Last release version: $RELEASE_VERSION
if [ "$PACKAGE_VERSION" != "$RELEASE_VERSION" ];then
echo "CREATE_NEW_DRAFT=1" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "Package version changed: $RELEASE_VERSION -> $PACKAGE_VERSION"
else
echo "Package version is the same"
fi
- name: Create superfluid-sentinel release draft
if: env.CREATE_NEW_DRAFT == 1
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: v${{ env.PACKAGE_VERSION }}
release_name: superfluid-sentinel@v${{ env.PACKAGE_VERSION }}
body: |
Changes in this superfluid-sentinel release
## Changed
## Added
## Fixes
## Breaking
draft: true