Skip to content

Commit

Permalink
github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-usman-108 committed May 28, 2024
1 parent c721c5e commit 15280af
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish npm package

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Build the package
run: npm run build

- name: Publish package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terraform-tool",
"version": "1.0.1",
"version": "1.0.3",
"description": "NPM package to provision cloud infrastructure as code (IaC) using terraform",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
provider "aws" {
region = "eu-central-1" // your AWS region
access_key = "XXXXXXXXXXXX" // your access key of AWS
secret_key = "XXXXXXXXXXXX" // your secret key of AWS
region = "eu-central-1" // your AWS region
access_key = "XXXXXXXXXXXXXXXXX"
secret_key = "XXXXXXXXXXXXXXXXX"
}

resource "aws_db_instance" "myRDS" {
Expand Down

0 comments on commit 15280af

Please sign in to comment.