Skip to content

Initial Release

Initial Release #10

Workflow file for this run

name: Pre-Release
on:
push:
branches:
- '*'
- '!main'
jobs:
pre_release:
name: Pre-Release
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
node-version: [ '20' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: |
npm install
- name: Set Branch Name (Ubuntu & MacOS)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo $BRANCH_NAME
- name: Check for existing release
run: |
TAG_NAME="v${{ env.BRANCH_NAME }}"
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.PAT_TOKEN }}" "https://api.github.com/repos/coldsofttech/action-pylint/releases/tags/${TAG_NAME}")
echo $RELEASE_ID
- name: Delete existing release
if: steps.check_release.outputs.release_id != ''
run: |
curl -X DELETE -s -H "Authorization: token ${{ secrets.PAT_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ steps.check_release.outputs.release_id }}"
- name: Create Pre-Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.set_branch_name.outputs.branch_name }}
release_name: v${{ steps.set_branch_name.outputs.branch_name }}
prerelease: true