Add exported go function "cycletls.NewTransport()" to return a custom… #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [15.x] | |
go-version: [1.17] | |
steps: | |
- uses: actions/checkout@v2 | |
- 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@v2 | |
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 }} |