Skip to content

Cicd/cp readme license #23

Cicd/cp readme license

Cicd/cp readme license #23

Workflow file for this run

name: Deploy
on:
release:
types:
- "published"
pull_request:
branches: ["main"]
jobs:
build-binary:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set Up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install Dependencies
run: go get .
- name: Get CLI Version
run: |
VERSION=$(go run scripts/version.go)
echo "Version: $VERSION"
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Build
run: CGO_ENABLED=0 go build -ldflags="-w -X 'github.com/ev-the-dev/tmplts/cmd.version=${{ env.VERSION }}'" -o bin/tmplts
- name: Copy Files
run: cp README.md LICENSE npm/
- name: ECHO Copy Files
run: |
ls -aLFG npm/
cat npm/README.md
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: go_binary
path: bin/tmplts
# publish-binary:
# runs-on: ubuntu-latest
# needs: build-binary
# defaults:
# run:
# working-directory: ./npm
# permissions:
# contents: read
# id-token: write
# steps:
# - uses: actions/checkout@v4
# - name: Set Up Node
# uses: actions/setup-node@v4
# with:
# node-version: latest
# registry-url: https://registry.npmjs.org/
# scope: "@ev-the-dev"
# - name: Download Binary
# uses: actions/download-artifact@v4
# with:
# name: go_binary
# path: npm
# - name: TEST
# run: |
# ls -alFG
# ls -alFG ../
# - name: Publish to NPM Registry
# run: |
# npm publish --provenance
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}