Skip to content

Release: ✨ Pipeline and Bug Fixes [1.0.27] (#351) #21

Release: ✨ Pipeline and Bug Fixes [1.0.27] (#351)

Release: ✨ Pipeline and Bug Fixes [1.0.27] (#351) #21

Workflow file for this run

name: "🚀 🟢 Npm Publish Package"
on:
push:
branches: [main]
jobs:
release:
name: 🚀 Npm Publish
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'Release:')"
strategy:
matrix:
node-version: [16.x]
go-version: ['1.21']
steps:
- uses: actions/checkout@v4
- name: 🟢 Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Export Go
run: go env -w GO111MODULE=auto
working-directory: ./
- name: Install golang dependencies
run: while read l; do go get -v "$l"; done < <(go list -f '{{ join .Imports "\n" }}' ./cycletls)
shell: bash
- name: Install deps
run: npm ci --unsafe-perm
working-directory: ./
- name: List changes
run: git status --verbose
working-directory: ./
- name: set name
run: git config --global user.name 'Danny-Dasilva'
- name: set email
run: git config --global user.email 'secrets.EMAIL'
- name: bump version
run: npm version patch -m "Release"
- name: Retrieve Latest Version
run: |
echo "::set-output name=LATEST_VERSION::$(npm view ${{ env.PACKAGE_NAME }} version)"
id: version
- name: Tag git
run: git tag ${{ steps.version.outputs.LATEST_VERSION }}
- name: Tag git
run: git push origin ${{ steps.version.outputs.LATEST_VERSION }}
- name: Push git
run: git push
- name: 🚀 Publish
run: npm publish
working-directory: ./
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}