From bb3e411eda9f84bcbf09f6fb4e22e119f86ba44b Mon Sep 17 00:00:00 2001 From: aidanCQ Date: Mon, 9 Sep 2024 14:59:10 +0100 Subject: [PATCH] Add prelease workflow. --- .github/workflows/pre-release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pre-release.yml diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..5de5e82 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,27 @@ +name: Pre Release library +on: + push: + branches: + - '*' # matches every branch that doesn't contain a '/' + - '*/*' # matches every branch containing a single '/' + - '**' # matches every branch + - '!main' # excludes main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install NPM dependencies + run: npm ci + + - name: Build library + run: npm run build + + - name: Publish library to github packages and npm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release