Skip to content

Merge branch 'dev'

Merge branch 'dev' #54

Workflow file for this run

#
# Copyright 2024 Cypriot Free Software Foundation
#
# Permission is hereby granted, free of charge,
# to any person obtaining a copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
name: "release-sass"
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 21
registry-url: 'https://registry.npmjs.org'
- name: "Install npm dependencies"
run: npm ci
- name: "Building SASS files"
run: npm run sass
- name: Set up Git Config
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
- name: commit built sass
uses: actions-x/commit@v6
with:
email: [email protected]
name: Autocommiting Built CSS
files: ./dist/*
token: ${{ secrets.MY_SECRET_TOKEN }}
force: true
- name: commit built package.json
uses: actions-x/commit@v6
with:
email: [email protected]
name: Mark Release as prerelease for npm
files: package.json
token: ${{ secrets.MY_SECRET_TOKEN }}
force: true
- name: version
id: version
run: |
echo version=$(npm run version --silent) >> "$GITHUB_OUTPUT"
- name: Tag version
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.version.outputs.version }}
- name: Make Css zip
run: |
zip -r cssonly.zip ./dist/*.css
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ steps.version.outputs.version }}"
prerelease: false
title: "Release ${{ steps.version.outputs.version }}"
files: |
cssonly.zip
- id: npm-publish
name: publish into npmjs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_KEY }}
run:
npm publish