Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the standard setup actions #12

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/actions/setup/action.yaml

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ jobs:
runs-on: self-hosted-hoprnet-small

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Building
run: yarn build
Expand All @@ -41,4 +49,4 @@ jobs:
mv temp.json package.json
yarn publish --no-git-tag-version --tag next
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}
16 changes: 12 additions & 4 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ jobs:
if: github.event.pull_request.merged == true

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Unpublish PR commit versions
run: |
Expand All @@ -44,4 +52,4 @@ jobs:
mv temp.json package.json
yarn publish --no-git-tag-version --tag alpha
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}
18 changes: 13 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ jobs:
runs-on: self-hosted-hoprnet-small

steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20

- name: Setup GCP
id: gcp
uses: hoprnet/hopr-workflows/actions/setup-gcp@master
with:
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
login-artifact-registry: 'true'

- name: Building
run: yarn build
Expand Down Expand Up @@ -85,7 +93,7 @@ jobs:
- name: Publish to Google Artifact Registry
run: yarn publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}
NODE_AUTH_TOKEN: ${{ steps.gcp.outputs.access_token }}

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -133,4 +141,4 @@ jobs:
to: 'Releases'
topic: 'main'
content: |
I'm glad to inform that version **${{ vars.NPM_PACKAGE_NAME }}@${{ steps.changelog.outputs.current_version }}** has been released. See [ChangeLog](https://github.com/hoprnet/uHTTP-crypto/releases/tag/v${{ steps.changelog.outputs.current_version }})
I'm thrilled to inform that version **${{ vars.NPM_PACKAGE_NAME }}@${{ steps.changelog.outputs.current_version }}** has been released. See [ChangeLog](https://github.com/${{ github.repository }}/releases/tag/v${{ steps.changelog.outputs.current_version }})