Skip to content
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
1 change: 0 additions & 1 deletion .Copy2AddInFolder.cmd

This file was deleted.

19 changes: 0 additions & 19 deletions .CreateWorkingFileFormAddInFolder.cmd

This file was deleted.

42 changes: 42 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# gitattributes template for Microsoft Access database source files
# Source: https://github.com/joyfullservice/msaccess-vcs-integration
#

###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Ensure that source files use CRLF for newlines, in case they are downloaded
# in a compressed archive directly from GitHub. (Otherwise class modules may
# not be imported correctly. See issue #150 for more details.)
###############################################################################
# Most source files use this extension
*.bas text eol=crlf
# Class modules
*.cls text eol=crlf
# Some object definitions
*.xml text eol=crlf
# SQL output
*.sql text eol=crlf
# Forms 2.0 form definitions (rarely used)
*.frm text eol=crlf
# Common source file
*.json text eol=crlf

###############################################################################
# Clarify that the source language is VBA (Auto-detection not always accurate)
# https://github.com/github/linguist/blob/master/docs/overrides.md
###############################################################################
*.bas linguist-language=VBA
*.cls linguist-language=VBA
*.twin linguist-language=VBA

# Git files
*.gitattributes text
*.gitattributes linguist-language=gitattributes

# Ignore files (like .npmignore or .gitignore)
*.*ignore text
*.*ignore export-ignore
51 changes: 51 additions & 0 deletions .github/workflows/build-accdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build-accdb (on push, pull)

on:
push:
branches:
- main
- feature/**
- bugfix/**
paths:
- 'source/**'
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: write
id-token: write
attestations: write

jobs:
build:
runs-on: [self-hosted, Windows, Office]

steps:
- name: "Checkout code for release tag"
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: "Build Access file (accdb/accde)"
id: build_access_file
uses: AccessCodeLib/msaccess-vcs-build@main
with:
source-dir: "source"
target-dir: "access-add-in"
file-name: "ACLibFilterFormWizard.accda"
timeout-minutes: 10

- name: "Upload Build Artifact"
uses: actions/upload-artifact@v4
id: "upload"
with:
name: "Install files"
path: "./access-add-in/*"
if-no-files-found: warn
- name: "Attestation"
uses: actions/attest-build-provenance@v2
with:
subject-name: "Install files"
subject-digest: sha256:${{ steps.upload.outputs.artifact-digest }}
83 changes: 83 additions & 0 deletions .github/workflows/build-release-zip-file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build-install-zip-file (on release)

on:
release:
types: [published]

permissions:
contents: write
id-token: write
attestations: write

jobs:
build:
runs-on: [self-hosted, Windows, Office]

steps:
- name: "Checkout code for release tag"
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: "Build Access file (accdb/accde)"
id: build_access_file
uses: AccessCodeLib/msaccess-vcs-build@main
with:
source-dir: "source"
target-dir: "access-add-in"
file-name: "ACLibFilterFormWizard.accda"
timeout-minutes: 10

- name: "Create versioned ZIP file"
run: |
$zipName = "ACLibFilterFormWizard_${{ github.event.release.tag_name }}.zip"
Compress-Archive -Path .\access-add-in\* -DestinationPath $zipName
echo "ZIP_NAME=$zipName" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: "Upload ZIP to GitHub Release"
uses: softprops/action-gh-release@v1
with:
files: ${{ env.ZIP_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Calculate SHA256 of ZIP"
id: hash
shell: pwsh
run: |
$zipName = "${{ env.ZIP_NAME }}"
$hash = Get-FileHash -Algorithm SHA256 -Path $zipName
$digest = "sha256:$($hash.Hash.ToLower())"
echo "ZIP_DIGEST=$digest" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "digest=$digest" >> $env:GITHUB_OUTPUT

- name: "Attestation"
uses: actions/attest-build-provenance@v2
id: attestation
with:
subject-name: "${{ env.ZIP_NAME }}"
subject-digest: "${{ steps.hash.outputs.digest }}"

- name: "Update release description with attestation URL"
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
TAG: ${{ github.event.release.tag_name }}
run: |
$ErrorActionPreference = "Stop"

# get current release notes
$oldBody = gh release view $env:TAG --repo $env:REPO --json body --template "{{.body}}"

# build Attestation URL
$attestationId = "${{ steps.attestation.outputs.attestation-id }}"
$attestationUrl = "https://github.com/$($env:REPO)/attestations/$attestationId"

# join release notes with Attestation url
$newBody = "$oldBody`n`nAttestation: $attestationUrl"

# save release notes
gh release edit $env:TAG --repo $env:REPO --notes "$newBody"


24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
/*.accdb
# gitattributes template for Microsoft Access database source files
# Website: https://github.com/joyfullservice/msaccess-vcs-addin
#

# Ignore Microsoft Access database binary files (Build these from source)
*.accda
*.accdb
*.mdb

# Ignore database lock files
*.laccdb
*.ldb

# The local VCS index file is paired with the binary database file
# and should not be comitted to version control.
vcs-index.json

# Ignore any dotenv files (used for external database connections)
*.env

# Ignore log files generated by the VCS Add-in
# Comment out the following line if you wish to include log files in git.
*.log
Binary file removed access-add-in/ACLibFilterFormWizard.accda
Binary file not shown.
92 changes: 0 additions & 92 deletions source/codelib/base/defGlobal.bas

This file was deleted.

10 changes: 0 additions & 10 deletions source/codelib/readme.md

This file was deleted.

Loading